********************************************************************************
**1033 PROGRAM DATABASE - LONGITUDINAL SHIPMENT/QUARTER 
********************************************************************************

********************************************************************************
**USING THE REPLICATION FILES 
********************************************************************************
**DOWNLOAD 1033 DATASET ZIP FILE
**USERS MUST UNZIP THE FILE INTO A SAVED DIRECTORY OF THEIR CHOOSING
**REPLACE "NAMED_DIRECTORY" IN THE BELOW FILEPATHS WITH USERS PERSONAL FILE PATH
**THE FILE NAMES AFTER "NAMED_DIRECTORY" REFLECT THE FILES IN THE FOLDER AND WILL BE PRESERVED 
**SIMPLY COPY AND PASTE YOUR FILE PATH EXTENSION IN PLACE OF "NAMED_DIRECTORY"
**THIS CAN BE COMPLETED IN STATA USING THE EDIT--> FIND--> REPLACE--> 
**THIS WILL REPLACE ALL RELEVANT LINES OF CODE AT ONCE FOR REPLICATION
**SEE EXAMPLE BELOW

**EXAMPLE FOR WINDOWS
**1033 DATABASE
**import delimited "C:\NAMED_DIRECTORY\1033_2014_2020.csv"
**FIND "NAMED_DIRECTORY"
**REPLACE WITH "Users\Documents\1033Data
**USER SPECIFIC 
**import delimited "C:\Users\Downloads\1033Data\1033_2014_2020.csv"

**USERS CAN ALSO SAVE AND OPEN TO THEIR DOWNLOADS FOLDER ON NON-PC SYSTEMS
**FILE PATH CAN BE REPLACED USING
**FIND "NAMED_DIRECTORY"
**REPLACE WITH "~/Downloads"

********************************************************************************
**CURRENT AND FUTURE DATABASE ACCESS
********************************************************************************
**THE CURRENT, FINAL DATABASE CAN BE ACCESSED WITHOUT REPLICATING ALL COMMANDS AT THE END OF THE DO FILE
**THE CURRENT, FINAL DATABASE IS ALSO AVAILABLE IN THE "CURRENT DATABASE" FOLDER 
**FUTURE UPDATES TO THE DATABASE UPON QUARTERLY DLA 1033 RELEASES WILL RESULT IN UPDATED CURRENT DATA IN THE FOLDER
**EXAMPLES FOR AMENDING THE SCRIPT FOR FUTURE QUARTERLY RELEASE ARE ALSO INCLUDED IN THE REPLICATION DO FILE
**FUTURE FILES AND FOLDERS WILL BE ADDED TO REFLECT NEW RELEASES AND ARCHIVE OLDER VERSIONS



********************************************************************************
********************************************************************************
**1033 PROGRAM DATABASE - LONGITUDINAL SHIPMENT/QUARTER 
********************************************************************************
********************************************************************************

**NOTE
**THE 2014-2020 1033 DATA COMES FROM THE LOWANDE DATASET WHICH IS PUBLICLY AVAILABLE HERE
**https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/XCTPNR

********************************************************************************
**2014 QUARTER 4 - 2020 QUARTER 1
********************************************************************************
**2014-2020 1033 DATA - LOWANDE FOIA
**LOAD ALL SHIPMENT DATA 2014-2020 TO BUILD/EXTEND LONGITUDINAL DATABASE
import delimited "C:\NAMED_DIRECTORY\1033_2014_2020.csv", case(preserve)
save "C:\NAMED_DIRECTORY\Lowande1033_2014_2020.dta", replace
clear
use "C:\NAMED_DIRECTORY\Lowande1033_2014_2020.dta"

**CREATE PANEL ID VARIABLES
*THESE VARIABLES WILL BE USED TO MAKE THE DATA LONGITUDINAL BY SHIPMENT QUARTER
rename lea_corrected AgencyName
order ShipDate, after(AgencyName)
sort State AgencyName ShipDate
egen AGENCY_ID = group(State AgencyName)
order AGENCY_ID AgencyName, before(State)
label var AGENCY_ID "Agency Unique ID"

bysort AGENCY_ID ShipDate: gen SUBTIME_ID =_n
order SUBTIME_ID, after(AGENCY_ID)

gen TIME_ID = 0
order TIME_ID, before(SUBTIME_ID)
bysort AGENCY_ID SUBTIME_ID ShipDate: replace TIME_ID = _n
sort AGENCY_ID TIME_ID ShipDate SUBTIME_ID
label var TIME_ID "Agency Unique Shipment ID"

egen TIME_ID2 = tag(AGENCY_ID ShipDate)
order TIME_ID2, after(TIME_ID)
replace TIME_ID2 = . if TIME_ID2 == 0

gen TIME_ID3 = .
by AGENCY_ID: replace TIME_ID3 = sum(TIME_ID2)
order TIME_ID3, after(TIME_ID2)

drop TIME_ID TIME_ID2
gen TIME_ID = TIME_ID3
order TIME_ID, after(AGENCY_ID)
drop TIME_ID3

**SUM SAME ITEM QUANTITIES
egen SHIP_COUNT = sum(Quantity), by(AGENCY_ID TIME_ID)
order SHIP_COUNT, after(Quantity)

egen ITEM_COUNT = sum(Quantity), by(AGENCY_ID TIME_ID ItemName)
order ITEM_COUNT, after(Quantity)

**SUM ACQUISITION VALUES
egen ITEM_VALUE = sum(AcquisitionValue), by(AGENCY_ID TIME_ID ItemName)
order ITEM_VALUE, after(AcquisitionValue)

egen SHIP_VALUE = sum(ITEM_VALUE), by(AGENCY_ID TIME_ID)
order SHIP_VALUE, after(ITEM_VALUE)

**THESE VARIABLES ARE DROPPED SO SHIPMENT/ITEM RECORDS CAN BE ORDERED
**CAN MERGE BACK IN SOURCE QUARTERS LATER
drop Quantity SUBTIME_ID UI AcquisitionValue StationType version q mon day yr 
duplicates drop 
order qtr, after(TIME_ID)

**GEN ITEM ID
sort AGENCY_ID TIME_ID ItemName qtr
by AGENCY_ID TIME_ID ItemName: gen ITEM_ID = _n
order ITEM_ID, after(TIME_ID)
drop if AGENCY_ID == .

**LABEL VARS
rename *, upper
label var SHIPDATE "Date Items Shipped"
label var TIME_ID "Agency Shipment Unique ID"
label var ITEM_ID "Agency Shipment Item Unique ID"
label var QTR "1033 Quarter Identifier"
label var AGENCYNAME "Agency Name"
label var STATE "Agency Associated State"
drop LEA
label var ITEMNAME "1033 Item Identifier"
label var ITEM_COUNT "1033 Unique Item Count per Shipment"
label var SHIP_COUNT "1033 Total Item Count per Shipment"
label var ITEM_VALUE "1033 Unique Item Value Total per Shipment"
label var SHIP_VALUE "1033 Total Item Value per Shipment"
label var DEMILCODE "1033 Demilitarization Code"
label var DEMILIC "1033 Integrity Code"

**SAVE
save "C:\NAMED_DIRECTORY\1033_NSN_2014_2020.dta", replace
clear

**THIS COMPLETES PREPARATION FOR 2014-2020 SHIPMENT QUARTERS

**NOTE
**2020 QUARTER 2 - 2023 QUARTER 2 ARE ACCESSED FROM THE DLA WEBPAGE
**THE ARCHIVED LINKS ARE INCLUDED 
**INDIVIDUAL DOWNLOAD FILES ARE IN THE ZIPPED FOLDER

********************************************************************************
**2020 QUARTER 2
********************************************************************************
**WEBPAGE
*https://www.dla.mil/Disposition-Services/Offers/Law-Enforcement/Public-Information/
**EXCEL LINK
*https://www.dla.mil/Portals/104/Documents/DispositionServices/LESO/AllStatesAndTerritoriesQTR2FY20.xlsx

**MUST SAVE LINK SEPARATELY DUE TO EXCEL FORMAT WITH SEPARATE PAGES/SHEETS (STATE SHEETS)
**DEVELOP LONGITUDINAL PANEL 1033 BY STATE/AGENCY
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q2.xlsx", sheet("Alabama") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Alabama_1033_2020_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q2.xlsx", sheet("Alaska") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Alaska_1033_2020_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q2.xlsx", sheet("Arizona") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Arizona_1033_2020_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q2.xlsx", sheet("Arkansas") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Arkansas_1033_2020_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q2.xlsx", sheet("California") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\California_1033_2020_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q2.xlsx", sheet("Colorado") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Colorado_1033_2020_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q2.xlsx", sheet("Connecticut") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Connecticut_1033_2020_Q2.dta", replace
clear
**NOTE INCORRECT DELAWARE SPELLING
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q2.xlsx", sheet("Deleware") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Delaware_1033_2020_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q2.xlsx", sheet("Florida") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Florida_1033_2020_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q2.xlsx", sheet("Georgia") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Georgia_1033_2020_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q2.xlsx", sheet("Guam") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Guam_1033_2020_Q2.dta", replace
clear
**INCOMPLETE INFO FOR HAWAII
*import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q2.xlsx", sheet("Hawaii") firstrow
*save "C:\NAMED_DIRECTORY\1033_Data_States\Hawaii_1033_2020_Q2.dta", replace
*clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q2.xlsx", sheet("Idaho") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Idaho_1033_2020_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q2.xlsx", sheet("Illinois") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Illinois_1033_2020_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q2.xlsx", sheet("Indiana") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Indiana_1033_2020_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q2.xlsx", sheet("Iowa") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Iowa_1033_2020_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q2.xlsx", sheet("Kansas") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Kansas_1033_2020_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q2.xlsx", sheet("Kentucky") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Kentucky_1033_2020_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q2.xlsx", sheet("Louisiana") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Louisiana_1033_2020_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q2.xlsx", sheet("Maine") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Maine_1033_2020_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q2.xlsx", sheet("Maryland") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Maryland_1033_2020_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q2.xlsx", sheet("Massachusetts") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Massachusetts_1033_2020_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q2.xlsx", sheet("Michigan") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Michigan_1033_2020_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q2.xlsx", sheet("Minnesota") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Minnesota_1033_2020_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q2.xlsx", sheet("Mississippi") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Mississippi_1033_2020_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q2.xlsx", sheet("Missouri") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Missouri_1033_2020_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q2.xlsx", sheet("Montana") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Montana_1033_2020_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q2.xlsx", sheet("Nebraska") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Nebraska_1033_2020_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q2.xlsx", sheet("Nevada") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Nevada_1033_2020_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q2.xlsx", sheet("New Hampshire") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\NewHampshire_1033_2020_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q2.xlsx", sheet("New Jersey") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\NewJersey_1033_2020_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q2.xlsx", sheet("New Mexico") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\NewMexico_1033_2020_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q2.xlsx", sheet("New York") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\NewYork_1033_2020_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q2.xlsx", sheet("North Carolina") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\NorthCarolina_1033_2020_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q2.xlsx", sheet("North Dakota") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\NorthDakota_1033_2020_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q2.xlsx", sheet("CNMI") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\NMIslands_1033_2020_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q2.xlsx", sheet("Ohio") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Ohio_1033_2020_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q2.xlsx", sheet("Oklahoma") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Oklahoma_1033_2020_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q2.xlsx", sheet("Oregon") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Oregon_1033_2020_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q2.xlsx", sheet("Pennsylvania") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Pennsylvania_1033_2020_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q2.xlsx", sheet("Puerto Rico") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\PRico_1033_2020_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q2.xlsx", sheet("Rhode Island") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\RhodeIsland_1033_2020_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q2.xlsx", sheet("South Carolina") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\SouthCarolina_1033_2020_Q2.dta", replace
clear
**NOTE SOUTH DAKOTA TYPO
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q2.xlsx", sheet("Page1_43") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\SouthDakota_1033_2020_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q2.xlsx", sheet("Tennessee") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Tennessee_1033_2020_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q2.xlsx", sheet("Texas") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Texas_1033_2020_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q2.xlsx", sheet("Utah") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Utah_1033_2020_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q2.xlsx", sheet("Vermont") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Vermont_1033_2020_Q2.dta", replace
clear
**NOTE VIRGIN ISLANDS OF THE US - "VIRIGN ISLANDS"
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q2.xlsx", sheet("Virgin Islands") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\VIUS_1033_2020_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q2.xlsx", sheet("Virginia") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Virginia_1033_2020_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q2.xlsx", sheet("Washington") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Washington_1033_2020_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q2.xlsx", sheet("West Virginia") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\WestVirginia_1033_2020_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q2.xlsx", sheet("Wisconsin") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Wisconsin_1033_2020_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q2.xlsx", sheet("Wyoming") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Wyoming_1033_2020_Q2.dta", replace
clear

**ALL INDIVIDUAL STATE FILES FOR EACH QUARTER CAN BE APPENDED TOGETHER AS A 1033 QUARTERLY DATABASE
**APPEND STATE DATASETS TOGETHER
use "C:\NAMED_DIRECTORY\1033_Data_States\Alabama_1033_2020_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Alaska_1033_2020_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Arizona_1033_2020_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Arkansas_1033_2020_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\California_1033_2020_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Colorado_1033_2020_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Connecticut_1033_2020_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Delaware_1033_2020_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Florida_1033_2020_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Georgia_1033_2020_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Guam_1033_2020_Q2.dta"
*append using "C:\NAMED_DIRECTORY\1033_Data_States\Hawaii_1033_2020_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Idaho_1033_2020_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Illinois_1033_2020_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Indiana_1033_2020_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Iowa_1033_2020_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Kansas_1033_2020_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Kentucky_1033_2020_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Louisiana_1033_2020_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Maine_1033_2020_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Maryland_1033_2020_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Massachusetts_1033_2020_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Michigan_1033_2020_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Minnesota_1033_2020_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Mississippi_1033_2020_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Missouri_1033_2020_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Montana_1033_2020_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Nebraska_1033_2020_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Nevada_1033_2020_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\NewHampshire_1033_2020_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\NewJersey_1033_2020_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\NewMexico_1033_2020_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\NewYork_1033_2020_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\NorthCarolina_1033_2020_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\NorthDakota_1033_2020_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\NMIslands_1033_2020_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Ohio_1033_2020_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Oklahoma_1033_2020_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Oregon_1033_2020_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Pennsylvania_1033_2020_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\PRico_1033_2020_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\RhodeIsland_1033_2020_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\SouthCarolina_1033_2020_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\SouthDakota_1033_2020_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Tennessee_1033_2020_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Texas_1033_2020_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Utah_1033_2020_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Vermont_1033_2020_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Virginia_1033_2020_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\VIUS_1033_2020_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Washington_1033_2020_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\WestVirginia_1033_2020_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Wisconsin_1033_2020_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Wyoming_1033_2020_Q2.dta"

**SAVE 2020 QUARTER 2 FULL STATE DATA
save "C:\NAMED_DIRECTORY\1033_StateData_2020_Q2.dta", replace
clear
use "C:\NAMED_DIRECTORY\1033_StateData_2020_Q2.dta"

**CREATE PANEL ID VARIABLES
order ShipDate, after(StationNameLEA)
sort State StationNameLEA ShipDate
egen AGENCY_ID = group(State StationNameLEA)
order AGENCY_ID, before(State)
label var AGENCY_ID "Agency Unique ID"

bysort AGENCY_ID ShipDate: gen SUBTIME_ID =_n
order SUBTIME_ID, after(AGENCY_ID)

gen TIME_ID = 0
order TIME_ID, before(SUBTIME_ID)
bysort AGENCY_ID SUBTIME_ID ShipDate: replace TIME_ID = _n
sort AGENCY_ID TIME_ID ShipDate SUBTIME_ID
label var TIME_ID "Agency Unique Shipment ID"

egen TIME_ID2 = tag(AGENCY_ID ShipDate)
order TIME_ID2, after(TIME_ID)
replace TIME_ID2 = . if TIME_ID2 == 0

gen TIME_ID3 = .
by AGENCY_ID: replace TIME_ID3 = sum(TIME_ID2)
order TIME_ID3, after(TIME_ID2)

drop TIME_ID TIME_ID2
gen TIME_ID = TIME_ID3
order TIME_ID, after(AGENCY_ID)
drop TIME_ID3

**SUM SAME ITEM QUANTITIES
egen SHIP_COUNT = sum(Quantity), by(AGENCY_ID TIME_ID)
order SHIP_COUNT, after(Quantity)

egen ITEM_COUNT = sum(Quantity), by(AGENCY_ID TIME_ID ItemName)
order ITEM_COUNT, after(Quantity)

**SUM ACQUISITION VALUES
egen ITEM_VALUE = sum(AcquisitionValue), by(AGENCY_ID TIME_ID ItemName)
order ITEM_VALUE, after(AcquisitionValue)

egen SHIP_VALUE = sum(ITEM_VALUE), by(AGENCY_ID TIME_ID)
order SHIP_VALUE, after(ITEM_VALUE)

**DROP ADDITIONALS AND DUPLICATES
**CAN MERGE BACK IN SOURCE QUARTERS LATER
drop Quantity NSN SUBTIME_ID UI AcquisitionValue StationType
duplicates drop 
gen QTR = "2020-2"
order QTR, after(TIME_ID)

**GEN ITEM ID
sort AGENCY_ID TIME_ID ItemName QTR
by AGENCY_ID TIME_ID ItemName: gen ITEM_ID = _n
order ITEM_ID, after(TIME_ID)
drop if AGENCY_ID == .

**LABEL VARS
rename *, upper
label var SHIPDATE "Date Items Shipped"
label var TIME_ID "Agency Shipment Unique ID"
label var ITEM_ID "Agency Shipment Item Unique ID"
label var QTR "1033 Quarter Identifier"
rename STATIONNAMELEA AGENCYNAME
label var AGENCYNAME "Agency Name"
label var STATE "Agency Associated State"
label var ITEMNAME "1033 Item Identifier"
label var ITEM_COUNT "1033 Unique Item Count per Shipment"
label var SHIP_COUNT "1033 Total Item Count per Shipment"
label var ITEM_VALUE "1033 Unique Item Value Total per Shipment"
label var SHIP_VALUE "1033 Total Item Value per Shipment"
label var DEMILCODE "1033 Demilitarization Code"
label var DEMILIC "1033 Integrity Code"


**SAVE 2020 QUARTER 2 
save "C:\NAMED_DIRECTORY\1033_StateData_2020_Q2.dta", replace
clear

********************************************************************************
**2020 QUARTER 3 - UNAVAILABLE
********************************************************************************
**WEBPAGE
*https://www.dla.mil/Disposition-Services/Offers/Law-Enforcement/Public-Information/
**EXCEL LINK
*https://www.dla.mil/Portals/104/Documents/DispositionServices/LESO/AllStatesAndTerritoriesQTR3FY20.xlsx

********************************************************************************
**2020 QUARTER 4
********************************************************************************
**WEBPAGE
*https://www.dla.mil/Disposition-Services/Offers/Law-Enforcement/Public-Information/
**EXCEL LINK
*https://www.dla.mil/Portals/104/Documents/DispositionServices/LESO/AllStatesAndTerritoriesQTR4FY20.xlsx

**MUST SAVE LINK SEPARATELY DUE TO EXCEL FORMAT WITH SHEETS (STATE SHEETS)
**DEVELOP LONGITUDINAL PANEL 1033 BY STATE/AGENCY
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q4.xlsx", sheet("Alabama") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Alabama_1033_2020_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q4.xlsx", sheet("Alaska") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Alaska_1033_2020_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q4.xlsx", sheet("Arizona") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Arizona_1033_2020_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q4.xlsx", sheet("Arkansas") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Arkansas_1033_2020_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q4.xlsx", sheet("California") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\California_1033_2020_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q4.xlsx", sheet("Colorado") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Colorado_1033_2020_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q4.xlsx", sheet("Connecticut") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Connecticut_1033_2020_Q4.dta", replace
clear
**NOTE INCORRECT DELAWARE SPELLING
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q4.xlsx", sheet("Deleware") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Delaware_1033_2020_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q4.xlsx", sheet("Florida") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Florida_1033_2020_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q4.xlsx", sheet("Georgia") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Georgia_1033_2020_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q4.xlsx", sheet("Guam") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Guam_1033_2020_Q4.dta", replace
clear
*import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q4.xlsx", sheet("Hawaii") firstrow
*save "C:\NAMED_DIRECTORY\1033_Data_States\Hawaii_1033_2020_Q4.dta", replace
*clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q4.xlsx", sheet("Idaho") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Idaho_1033_2020_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q4.xlsx", sheet("Illinois") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Illinois_1033_2020_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q4.xlsx", sheet("Indiana") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Indiana_1033_2020_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q4.xlsx", sheet("Iowa") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Iowa_1033_2020_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q4.xlsx", sheet("Kansas") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Kansas_1033_2020_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q4.xlsx", sheet("Kentucky") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Kentucky_1033_2020_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q4.xlsx", sheet("Louisiana") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Louisiana_1033_2020_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q4.xlsx", sheet("Maine") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Maine_1033_2020_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q4.xlsx", sheet("Maryland") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Maryland_1033_2020_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q4.xlsx", sheet("Massachusetts") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Massachusetts_1033_2020_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q4.xlsx", sheet("Michigan") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Michigan_1033_2020_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q4.xlsx", sheet("Minnesota") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Minnesota_1033_2020_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q4.xlsx", sheet("Mississippi") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Mississippi_1033_2020_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q4.xlsx", sheet("Missouri") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Missouri_1033_2020_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q4.xlsx", sheet("Montana") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Montana_1033_2020_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q4.xlsx", sheet("Nebraska") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Nebraska_1033_2020_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q4.xlsx", sheet("Nevada") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Nevada_1033_2020_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q4.xlsx", sheet("New Hampshire") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\NewHampshire_1033_2020_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q4.xlsx", sheet("New Jersey") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\NewJersey_1033_2020_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q4.xlsx", sheet("New Mexico") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\NewMexico_1033_2020_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q4.xlsx", sheet("New York") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\NewYork_1033_2020_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q4.xlsx", sheet("North Carolina") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\NorthCarolina_1033_2020_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q4.xlsx", sheet("North Dakota") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\NorthDakota_1033_2020_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q4.xlsx", sheet("CNMI") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\NMIslands_1033_2020_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q4.xlsx", sheet("Ohio") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Ohio_1033_2020_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q4.xlsx", sheet("Oklahoma") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Oklahoma_1033_2020_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q4.xlsx", sheet("Oregon") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Oregon_1033_2020_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q4.xlsx", sheet("Pennsylvania") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Pennsylvania_1033_2020_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q4.xlsx", sheet("Puerto Rico") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\PRico_1033_2020_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q4.xlsx", sheet("Rhode Island") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\RhodeIsland_1033_2020_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q4.xlsx", sheet("South Carolina") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\SouthCarolina_1033_2020_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q4.xlsx", sheet("South Dakota") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\SouthDakota_1033_2020_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q4.xlsx", sheet("Tennessee") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Tennessee_1033_2020_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q4.xlsx", sheet("Texas") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Texas_1033_2020_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q4.xlsx", sheet("Utah") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Utah_1033_2020_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q4.xlsx", sheet("Vermont") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Vermont_1033_2020_Q4.dta", replace
clear
**NOTE VIRGIN ISLANDS OF THE US - "VIRIGN ISLANDS"
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q4.xlsx", sheet("Virgin Islands") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\VIUS_1033_2020_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q4.xlsx", sheet("Virginia") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Virginia_1033_2020_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q4.xlsx", sheet("Washington") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Washington_1033_2020_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q4.xlsx", sheet("West Virginia") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\WestVirginia_1033_2020_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q4.xlsx", sheet("Wisconsin") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Wisconsin_1033_2020_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY20Q4.xlsx", sheet("Wyoming") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Wyoming_1033_2020_Q4.dta", replace
clear

**APPEND STATE DATASETS TOGETHER
use "C:\NAMED_DIRECTORY\1033_Data_States\Alabama_1033_2020_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Alaska_1033_2020_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Arizona_1033_2020_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Arkansas_1033_2020_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\California_1033_2020_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Colorado_1033_2020_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Connecticut_1033_2020_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Delaware_1033_2020_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Florida_1033_2020_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Georgia_1033_2020_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Guam_1033_2020_Q4.dta"
*append using "C:\NAMED_DIRECTORY\1033_Data_States\Hawaii_1033_2020_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Idaho_1033_2020_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Illinois_1033_2020_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Indiana_1033_2020_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Iowa_1033_2020_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Kansas_1033_2020_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Kentucky_1033_2020_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Louisiana_1033_2020_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Maine_1033_2020_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Maryland_1033_2020_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Massachusetts_1033_2020_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Michigan_1033_2020_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Minnesota_1033_2020_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Mississippi_1033_2020_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Missouri_1033_2020_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Montana_1033_2020_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Nebraska_1033_2020_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Nevada_1033_2020_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\NewHampshire_1033_2020_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\NewJersey_1033_2020_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\NewMexico_1033_2020_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\NewYork_1033_2020_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\NorthCarolina_1033_2020_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\NorthDakota_1033_2020_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\NMIslands_1033_2020_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Ohio_1033_2020_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Oklahoma_1033_2020_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Oregon_1033_2020_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Pennsylvania_1033_2020_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\PRico_1033_2020_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\RhodeIsland_1033_2020_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\SouthCarolina_1033_2020_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\SouthDakota_1033_2020_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Tennessee_1033_2020_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Texas_1033_2020_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Utah_1033_2020_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Vermont_1033_2020_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Virginia_1033_2020_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\VIUS_1033_2020_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Washington_1033_2020_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\WestVirginia_1033_2020_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Wisconsin_1033_2020_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Wyoming_1033_2020_Q4.dta"

**SAVE 2020 QUARTER 4 
save "C:\NAMED_DIRECTORY\1033_StateData_2020_Q4.dta", replace
clear
use "C:\NAMED_DIRECTORY\1033_StateData_2020_Q4.dta"

**CREATE PANEL ID VARIABLES
order ShipDate, after(StationNameLEA)
sort State StationNameLEA ShipDate
egen AGENCY_ID = group(State StationNameLEA)
order AGENCY_ID, before(State)
label var AGENCY_ID "Agency Unique ID"

bysort AGENCY_ID ShipDate: gen SUBTIME_ID =_n
order SUBTIME_ID, after(AGENCY_ID)

gen TIME_ID = 0
order TIME_ID, before(SUBTIME_ID)
bysort AGENCY_ID SUBTIME_ID ShipDate: replace TIME_ID = _n
sort AGENCY_ID TIME_ID ShipDate SUBTIME_ID
label var TIME_ID "Agency Unique Shipment ID"

egen TIME_ID2 = tag(AGENCY_ID ShipDate)
order TIME_ID2, after(TIME_ID)
replace TIME_ID2 = . if TIME_ID2 == 0

gen TIME_ID3 = .
by AGENCY_ID: replace TIME_ID3 = sum(TIME_ID2)
order TIME_ID3, after(TIME_ID2)

drop TIME_ID TIME_ID2
gen TIME_ID = TIME_ID3
order TIME_ID, after(AGENCY_ID)
drop TIME_ID3

**SUM SAME ITEM QUANTITIES
egen SHIP_COUNT = sum(Quantity), by(AGENCY_ID TIME_ID)
order SHIP_COUNT, after(Quantity)

egen ITEM_COUNT = sum(Quantity), by(AGENCY_ID TIME_ID ItemName)
order ITEM_COUNT, after(Quantity)

**SUM ACQUISITION VALUES
egen ITEM_VALUE = sum(AcquisitionValue), by(AGENCY_ID TIME_ID ItemName)
order ITEM_VALUE, after(AcquisitionValue)

egen SHIP_VALUE = sum(ITEM_VALUE), by(AGENCY_ID TIME_ID)
order SHIP_VALUE, after(ITEM_VALUE)

**DROP ADDITIONALS AND DUPLICATES
**CAN MERGE BACK IN SOURCE QUARTERS LATER
drop Quantity NSN SUBTIME_ID UI AcquisitionValue StationType
duplicates drop 
gen QTR = "2020-4"
order QTR, after(TIME_ID)

**GEN ITEM ID
sort AGENCY_ID TIME_ID ItemName QTR
by AGENCY_ID TIME_ID ItemName: gen ITEM_ID = _n
order ITEM_ID, after(TIME_ID)
drop if AGENCY_ID == .

**LABEL VARS
rename *, upper
label var SHIPDATE "Date Items Shipped"
label var TIME_ID "Agency Shipment Unique ID"
label var ITEM_ID "Agency Shipment Item Unique ID"
label var QTR "1033 Quarter Identifier"
rename STATIONNAMELEA AGENCYNAME
label var AGENCYNAME "Agency Name"
label var STATE "Agency Associated State"
label var ITEMNAME "1033 Item Identifier"
label var ITEM_COUNT "1033 Unique Item Count per Shipment"
label var SHIP_COUNT "1033 Total Item Count per Shipment"
label var ITEM_VALUE "1033 Unique Item Value Total per Shipment"
label var SHIP_VALUE "1033 Total Item Value per Shipment"
label var DEMILCODE "1033 Demilitarization Code"
label var DEMILIC "1033 Integrity Code"

**SAVE 2020 QUARTER 4 
save "C:\NAMED_DIRECTORY\1033_StateData_2020_Q4.dta", replace
clear

********************************************************************************
**2021 QUARTER 1 - UNAVAILABLE
********************************************************************************
**WEBPAGE
*https://www.dla.mil/Disposition-Services/Offers/Law-Enforcement/Public-Information/
**EXCEL LINK
*https://www.dla.mil/Portals/104/Documents/DispositionServices/LESO/AllStatesAndTerritoriesQTR1FY21.xlsx

********************************************************************************
**2021 QUARTER 2
********************************************************************************
**WEBPAGE
*https://www.dla.mil/Disposition-Services/Offers/Law-Enforcement/Public-Information/
**EXCEL LINK
*https://www.dla.mil/Portals/104/Documents/DispositionServices/LESO/AllStatesAndTerritoriesQTR2FY21.xlsx

**MUST SAVE LINK SEPARATELY DUE TO EXCEL FORMAT WITH SHEETS (STATE SHEETS)
**DEVELOP LONGITUDINAL PANEL 1033 BY STATE/AGENCY
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q2.xlsx", sheet("Alabama") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Alabama_1033_2021_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q2.xlsx", sheet("Alaska") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Alaska_1033_2021_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q2.xlsx", sheet("Arizona") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Arizona_1033_2021_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q2.xlsx", sheet("Arkansas") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Arkansas_1033_2021_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q2.xlsx", sheet("California") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\California_1033_2021_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q2.xlsx", sheet("Colorado") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Colorado_1033_2021_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q2.xlsx", sheet("Connecticut") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Connecticut_1033_2021_Q2.dta", replace
clear
**NOTE INCORRECT DELAWARE SPELLING
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q2.xlsx", sheet("Deleware") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Delaware_1033_2021_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q2.xlsx", sheet("Florida") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Florida_1033_2021_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q2.xlsx", sheet("Georgia") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Georgia_1033_2021_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q2.xlsx", sheet("Guam") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Guam_1033_2021_Q2.dta", replace
clear
*import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q2.xlsx", sheet("Hawaii") firstrow
*save "C:\NAMED_DIRECTORY\1033_Data_States\Hawaii_1033_2021_Q2.dta", replace
*clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q2.xlsx", sheet("Idaho") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Idaho_1033_2021_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q2.xlsx", sheet("Illinois") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Illinois_1033_2021_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q2.xlsx", sheet("Indiana") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Indiana_1033_2021_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q2.xlsx", sheet("Iowa") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Iowa_1033_2021_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q2.xlsx", sheet("Kansas") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Kansas_1033_2021_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q2.xlsx", sheet("Kentucky") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Kentucky_1033_2021_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q2.xlsx", sheet("Louisiana") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Louisiana_1033_2021_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q2.xlsx", sheet("Maine") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Maine_1033_2021_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q2.xlsx", sheet("Maryland") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Maryland_1033_2021_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q2.xlsx", sheet("Massachusetts") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Massachusetts_1033_2021_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q2.xlsx", sheet("Michigan") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Michigan_1033_2021_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q2.xlsx", sheet("Minnesota") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Minnesota_1033_2021_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q2.xlsx", sheet("Mississippi") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Mississippi_1033_2021_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q2.xlsx", sheet("Missouri") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Missouri_1033_2021_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q2.xlsx", sheet("Montana") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Montana_1033_2021_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q2.xlsx", sheet("Nebraska") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Nebraska_1033_2021_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q2.xlsx", sheet("Nevada") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Nevada_1033_2021_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q2.xlsx", sheet("New Hampshire") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\NewHampshire_1033_2021_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q2.xlsx", sheet("New Jersey") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\NewJersey_1033_2021_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q2.xlsx", sheet("New Mexico") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\NewMexico_1033_2021_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q2.xlsx", sheet("New York") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\NewYork_1033_2021_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q2.xlsx", sheet("North Carolina") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\NorthCarolina_1033_2021_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q2.xlsx", sheet("North Dakota") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\NorthDakota_1033_2021_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q2.xlsx", sheet("CNMI") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\NMIslands_1033_2021_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q2.xlsx", sheet("Ohio") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Ohio_1033_2021_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q2.xlsx", sheet("Oklahoma") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Oklahoma_1033_2021_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q2.xlsx", sheet("Oregon") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Oregon_1033_2021_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q2.xlsx", sheet("Pennsylvania") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Pennsylvania_1033_2021_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q2.xlsx", sheet("Puerto Rico") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\PRico_1033_2021_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q2.xlsx", sheet("Rhode Island") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\RhodeIsland_1033_2021_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q2.xlsx", sheet("South Carolina") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\SouthCarolina_1033_2021_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q2.xlsx", sheet("South Dakota") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\SouthDakota_1033_2021_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q2.xlsx", sheet("Tennessee") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Tennessee_1033_2021_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q2.xlsx", sheet("Texas") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Texas_1033_2021_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q2.xlsx", sheet("Utah") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Utah_1033_2021_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q2.xlsx", sheet("Vermont") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Vermont_1033_2021_Q2.dta", replace
clear
**NOTE VIRGIN ISLANDS OF THE US - "VIRIGN ISLANDS"
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q2.xlsx", sheet("Virgin Islands") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\VIUS_1033_2021_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q2.xlsx", sheet("Virginia") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Virginia_1033_2021_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q2.xlsx", sheet("Washington") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Washington_1033_2021_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q2.xlsx", sheet("West Virginia") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\WestVirginia_1033_2021_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q2.xlsx", sheet("Wisconsin") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Wisconsin_1033_2021_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q2.xlsx", sheet("Wyoming") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Wyoming_1033_2021_Q2.dta", replace
clear

**APPEND STATE DATASETS TOGETHER
use "C:\NAMED_DIRECTORY\1033_Data_States\Alabama_1033_2021_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Alaska_1033_2021_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Arizona_1033_2021_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Arkansas_1033_2021_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\California_1033_2021_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Colorado_1033_2021_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Connecticut_1033_2021_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Delaware_1033_2021_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Florida_1033_2021_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Georgia_1033_2021_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Guam_1033_2021_Q2.dta"
*append using "C:\NAMED_DIRECTORY\1033_Data_States\Hawaii_1033_2021_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Idaho_1033_2021_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Illinois_1033_2021_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Indiana_1033_2021_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Iowa_1033_2021_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Kansas_1033_2021_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Kentucky_1033_2021_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Louisiana_1033_2021_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Maine_1033_2021_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Maryland_1033_2021_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Massachusetts_1033_2021_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Michigan_1033_2021_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Minnesota_1033_2021_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Mississippi_1033_2021_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Missouri_1033_2021_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Montana_1033_2021_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Nebraska_1033_2021_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Nevada_1033_2021_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\NewHampshire_1033_2021_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\NewJersey_1033_2021_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\NewMexico_1033_2021_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\NewYork_1033_2021_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\NorthCarolina_1033_2021_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\NorthDakota_1033_2021_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\NMIslands_1033_2021_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Ohio_1033_2021_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Oklahoma_1033_2021_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Oregon_1033_2021_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Pennsylvania_1033_2021_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\PRico_1033_2021_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\RhodeIsland_1033_2021_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\SouthCarolina_1033_2021_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\SouthDakota_1033_2021_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Tennessee_1033_2021_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Texas_1033_2021_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Utah_1033_2021_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Vermont_1033_2021_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Virginia_1033_2021_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\VIUS_1033_2021_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Washington_1033_2021_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\WestVirginia_1033_2021_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Wisconsin_1033_2021_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Wyoming_1033_2021_Q2.dta"

**SAVE 2021 QUARTER 2 
save "C:\NAMED_DIRECTORY\1033_StateData_2021_Q2.dta", replace
clear
use "C:\NAMED_DIRECTORY\1033_StateData_2021_Q2.dta"

**CREATE PANEL ID VARIABLES
order ShipDate, after(StationNameLEA)
sort State StationNameLEA ShipDate
egen AGENCY_ID = group(State StationNameLEA)
order AGENCY_ID, before(State)
label var AGENCY_ID "Agency Unique ID"

bysort AGENCY_ID ShipDate: gen SUBTIME_ID =_n
order SUBTIME_ID, after(AGENCY_ID)

gen TIME_ID = 0
order TIME_ID, before(SUBTIME_ID)
bysort AGENCY_ID SUBTIME_ID ShipDate: replace TIME_ID = _n
sort AGENCY_ID TIME_ID ShipDate SUBTIME_ID
label var TIME_ID "Agency Unique Shipment ID"

egen TIME_ID2 = tag(AGENCY_ID ShipDate)
order TIME_ID2, after(TIME_ID)
replace TIME_ID2 = . if TIME_ID2 == 0

gen TIME_ID3 = .
by AGENCY_ID: replace TIME_ID3 = sum(TIME_ID2)
order TIME_ID3, after(TIME_ID2)

drop TIME_ID TIME_ID2
gen TIME_ID = TIME_ID3
order TIME_ID, after(AGENCY_ID)
drop TIME_ID3

**SUM SAME ITEM QUANTITIES
egen SHIP_COUNT = sum(Quantity), by(AGENCY_ID TIME_ID)
order SHIP_COUNT, after(Quantity)

egen ITEM_COUNT = sum(Quantity), by(AGENCY_ID TIME_ID ItemName)
order ITEM_COUNT, after(Quantity)

**SUM ACQUISITION VALUES
egen ITEM_VALUE = sum(AcquisitionValue), by(AGENCY_ID TIME_ID ItemName)
order ITEM_VALUE, after(AcquisitionValue)

egen SHIP_VALUE = sum(ITEM_VALUE), by(AGENCY_ID TIME_ID)
order SHIP_VALUE, after(ITEM_VALUE)

**DROP ADDITIONALS AND DUPLICATES
**CAN MERGE BACK IN SOURCE QUARTERS LATER
drop Quantity NSN SUBTIME_ID UI AcquisitionValue StationType
duplicates drop 
gen QTR = "2021-2"
order QTR, after(TIME_ID)

**GEN ITEM ID
sort AGENCY_ID TIME_ID ItemName QTR
by AGENCY_ID TIME_ID ItemName: gen ITEM_ID = _n
order ITEM_ID, after(TIME_ID)
drop if AGENCY_ID == .

**LABEL VARS
rename *, upper
label var SHIPDATE "Date Items Shipped"
label var TIME_ID "Agency Shipment Unique ID"
label var ITEM_ID "Agency Shipment Item Unique ID"
label var QTR "1033 Quarter Identifier"
rename STATIONNAMELEA AGENCYNAME
label var AGENCYNAME "Agency Name"
label var STATE "Agency Associated State"
label var ITEMNAME "1033 Item Identifier"
label var ITEM_COUNT "1033 Unique Item Count per Shipment"
label var SHIP_COUNT "1033 Total Item Count per Shipment"
label var ITEM_VALUE "1033 Unique Item Value Total per Shipment"
label var SHIP_VALUE "1033 Total Item Value per Shipment"
label var DEMILCODE "1033 Demilitarization Code"
label var DEMILIC "1033 Integrity Code"

**SAVE 2021 QUARTER 2 
save "C:\NAMED_DIRECTORY\1033_StateData_2021_Q2.dta", replace
clear

********************************************************************************
**2021 QUARTER 3
********************************************************************************
**WEBPAGE
*https://www.dla.mil/Disposition-Services/Offers/Law-Enforcement/Public-Information/
**EXCEL LINK
*https://www.dla.mil/Portals/104/Documents/DispositionServices/LESO/AllStatesAndTerritoriesQTR3FY21.xlsx

**MUST SAVE LINK SEPARATELY DUE TO EXCEL FORMAT WITH SHEETS (STATE SHEETS)
**DEVELOP LONGITUDINAL PANEL 1033 BY STATE/AGENCY
**NOTE ALL CAPS STATE NAMES - EXCEL PAGES
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q3.xlsx", sheet("ALABAMA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Alabama_1033_2021_Q3.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q3.xlsx", sheet("ALASKA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Alaska_1033_2021_Q3.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q3.xlsx", sheet("ARIZONA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Arizona_1033_2021_Q3.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q3.xlsx", sheet("ARKANSAS") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Arkansas_1033_2021_Q3.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q3.xlsx", sheet("CALIFORNIA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\California_1033_2021_Q3.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q3.xlsx", sheet("COLORADO") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Colorado_1033_2021_Q3.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q3.xlsx", sheet("CONNECTICUT") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Connecticut_1033_2021_Q3.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q3.xlsx", sheet("DELAWARE") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Delaware_1033_2021_Q3.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q3.xlsx", sheet("FLORIDA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Florida_1033_2021_Q3.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q3.xlsx", sheet("GEORGIA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Georgia_1033_2021_Q3.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q3.xlsx", sheet("GUAM") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Guam_1033_2021_Q3.dta", replace
clear
*import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q3.xlsx", sheet("Hawaii") firstrow
*save "C:\NAMED_DIRECTORY\1033_Data_States\Hawaii_1033_2021_Q3.dta", replace
*clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q3.xlsx", sheet("IDAHO") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Idaho_1033_2021_Q3.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q3.xlsx", sheet("ILLINOIS") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Illinois_1033_2021_Q3.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q3.xlsx", sheet("INDIANA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Indiana_1033_2021_Q3.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q3.xlsx", sheet("IOWA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Iowa_1033_2021_Q3.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q3.xlsx", sheet("KANSAS") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Kansas_1033_2021_Q3.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q3.xlsx", sheet("KENTUCKY") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Kentucky_1033_2021_Q3.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q3.xlsx", sheet("LOUISIANA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Louisiana_1033_2021_Q3.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q3.xlsx", sheet("MAINE") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Maine_1033_2021_Q3.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q3.xlsx", sheet("MARYLAND") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Maryland_1033_2021_Q3.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q3.xlsx", sheet("MASSACHUSETTS") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Massachusetts_1033_2021_Q3.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q3.xlsx", sheet("MICHIGAN") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Michigan_1033_2021_Q3.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q3.xlsx", sheet("MINNESOTA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Minnesota_1033_2021_Q3.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q3.xlsx", sheet("MISSISSIPPI") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Mississippi_1033_2021_Q3.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q3.xlsx", sheet("MISSOURI") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Missouri_1033_2021_Q3.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q3.xlsx", sheet("MONTANA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Montana_1033_2021_Q3.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q3.xlsx", sheet("NEBRASKA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Nebraska_1033_2021_Q3.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q3.xlsx", sheet("NEVADA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Nevada_1033_2021_Q3.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q3.xlsx", sheet("NEW HAMPSHIRE") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\NewHampshire_1033_2021_Q3.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q3.xlsx", sheet("NEW JERSEY") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\NewJersey_1033_2021_Q3.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q3.xlsx", sheet("NEW MEXICO") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\NewMexico_1033_2021_Q3.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q3.xlsx", sheet("NEW YORK") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\NewYork_1033_2021_Q3.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q3.xlsx", sheet("NORTH CAROLINA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\NorthCarolina_1033_2021_Q3.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q3.xlsx", sheet("NORTH DAKOTA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\NorthDakota_1033_2021_Q3.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q3.xlsx", sheet("NORTHERN MARIANA ISLANDS") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\NMIslands_1033_2021_Q3.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q3.xlsx", sheet("OHIO") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Ohio_1033_2021_Q3.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q3.xlsx", sheet("OKLAHOMA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Oklahoma_1033_2021_Q3.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q3.xlsx", sheet("OREGON") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Oregon_1033_2021_Q3.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q3.xlsx", sheet("PENNSYLVANIA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Pennsylvania_1033_2021_Q3.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q3.xlsx", sheet("PUERTO RICO") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\PRico_1033_2021_Q3.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q3.xlsx", sheet("RHODE ISLAND") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\RhodeIsland_1033_2021_Q3.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q3.xlsx", sheet("SOUTH CAROLINA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\SouthCarolina_1033_2021_Q3.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q3.xlsx", sheet("SOUTH DAKOTA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\SouthDakota_1033_2021_Q3.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q3.xlsx", sheet("TENNESSEE") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Tennessee_1033_2021_Q3.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q3.xlsx", sheet("TEXAS") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Texas_1033_2021_Q3.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q3.xlsx", sheet("UTAH") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Utah_1033_2021_Q3.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q3.xlsx", sheet("VERMONT") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Vermont_1033_2021_Q3.dta", replace
clear
**NOTE VIRGIN ISLANDS OF THE US - "VIRIGN ISLANDS"
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q3.xlsx", sheet("VIRGIN ISLANDS OF THE U.S.") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\VIUS_1033_2021_Q3.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q3.xlsx", sheet("VIRGINIA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Virginia_1033_2021_Q3.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q3.xlsx", sheet("WASHINGTON") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Washington_1033_2021_Q3.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q3.xlsx", sheet("WEST VIRGINIA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\WestVirginia_1033_2021_Q3.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q3.xlsx", sheet("WISCONSIN") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Wisconsin_1033_2021_Q3.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY21Q3.xlsx", sheet("WYOMING") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Wyoming_1033_2021_Q3.dta", replace
clear

**APPEND STATE DATASETS TOGETHER
use "C:\NAMED_DIRECTORY\1033_Data_States\Alabama_1033_2021_Q3.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Alaska_1033_2021_Q3.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Arizona_1033_2021_Q3.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Arkansas_1033_2021_Q3.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\California_1033_2021_Q3.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Colorado_1033_2021_Q3.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Connecticut_1033_2021_Q3.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Delaware_1033_2021_Q3.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Florida_1033_2021_Q3.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Georgia_1033_2021_Q3.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Guam_1033_2021_Q3.dta"
*append using "C:\NAMED_DIRECTORY\1033_Data_States\Hawaii_1033_2021_Q3.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Idaho_1033_2021_Q3.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Illinois_1033_2021_Q3.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Indiana_1033_2021_Q3.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Iowa_1033_2021_Q3.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Kansas_1033_2021_Q3.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Kentucky_1033_2021_Q3.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Louisiana_1033_2021_Q3.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Maine_1033_2021_Q3.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Maryland_1033_2021_Q3.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Massachusetts_1033_2021_Q3.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Michigan_1033_2021_Q3.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Minnesota_1033_2021_Q3.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Mississippi_1033_2021_Q3.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Missouri_1033_2021_Q3.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Montana_1033_2021_Q3.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Nebraska_1033_2021_Q3.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Nevada_1033_2021_Q3.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\NewHampshire_1033_2021_Q3.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\NewJersey_1033_2021_Q3.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\NewMexico_1033_2021_Q3.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\NewYork_1033_2021_Q3.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\NorthCarolina_1033_2021_Q3.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\NorthDakota_1033_2021_Q3.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\NMIslands_1033_2021_Q3.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Ohio_1033_2021_Q3.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Oklahoma_1033_2021_Q3.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Oregon_1033_2021_Q3.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Pennsylvania_1033_2021_Q3.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\PRico_1033_2021_Q3.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\RhodeIsland_1033_2021_Q3.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\SouthCarolina_1033_2021_Q3.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\SouthDakota_1033_2021_Q3.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Tennessee_1033_2021_Q3.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Texas_1033_2021_Q3.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Utah_1033_2021_Q3.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Vermont_1033_2021_Q3.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Virginia_1033_2021_Q3.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\VIUS_1033_2021_Q3.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Washington_1033_2021_Q3.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\WestVirginia_1033_2021_Q3.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Wisconsin_1033_2021_Q3.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Wyoming_1033_2021_Q3.dta"

**SAVE 2021 QUARTER 3 
save "C:\NAMED_DIRECTORY\1033_StateData_2021_Q3.dta", replace
clear
use "C:\NAMED_DIRECTORY\1033_StateData_2021_Q3.dta"

**CREATE PANEL ID VARIABLES
order ShipDate, after(AgencyName)
sort State AgencyName ShipDate
egen AGENCY_ID = group(State AgencyName)
order AGENCY_ID, before(State)
label var AGENCY_ID "Agency Unique ID"

bysort AGENCY_ID ShipDate: gen SUBTIME_ID =_n
order SUBTIME_ID, after(AGENCY_ID)

gen TIME_ID = 0
order TIME_ID, before(SUBTIME_ID)
bysort AGENCY_ID SUBTIME_ID ShipDate: replace TIME_ID = _n
sort AGENCY_ID TIME_ID ShipDate SUBTIME_ID
label var TIME_ID "Agency Unique Shipment ID"

egen TIME_ID2 = tag(AGENCY_ID ShipDate)
order TIME_ID2, after(TIME_ID)
replace TIME_ID2 = . if TIME_ID2 == 0

gen TIME_ID3 = .
by AGENCY_ID: replace TIME_ID3 = sum(TIME_ID2)
order TIME_ID3, after(TIME_ID2)

drop TIME_ID TIME_ID2
gen TIME_ID = TIME_ID3
order TIME_ID, after(AGENCY_ID)
drop TIME_ID3

**SUM SAME ITEM QUANTITIES
egen SHIP_COUNT = sum(Quantity), by(AGENCY_ID TIME_ID)
order SHIP_COUNT, after(Quantity)

egen ITEM_COUNT = sum(Quantity), by(AGENCY_ID TIME_ID ItemName)
order ITEM_COUNT, after(Quantity)

**SUM ACQUISITION VALUES
egen ITEM_VALUE = sum(AcquisitionValue), by(AGENCY_ID TIME_ID ItemName)
order ITEM_VALUE, after(AcquisitionValue)

egen SHIP_VALUE = sum(ITEM_VALUE), by(AGENCY_ID TIME_ID)
order SHIP_VALUE, after(ITEM_VALUE)

**DROP ADDITIONALS AND DUPLICATES
**CAN MERGE BACK IN SOURCE QUARTERS LATER
drop Quantity NSN SUBTIME_ID UI AcquisitionValue StationType
duplicates drop 
gen QTR = "2021-3"
order QTR, after(TIME_ID)

**GEN ITEM ID
sort AGENCY_ID TIME_ID ItemName QTR
by AGENCY_ID TIME_ID ItemName: gen ITEM_ID = _n
order ITEM_ID, after(TIME_ID)
drop if AGENCY_ID == .

**LABEL VARS
rename *, upper
label var SHIPDATE "Date Items Shipped"
label var TIME_ID "Agency Shipment Unique ID"
label var ITEM_ID "Agency Shipment Item Unique ID"
label var QTR "1033 Quarter Identifier"
label var AGENCYNAME "Agency Name"
label var STATE "Agency Associated State"
label var ITEMNAME "1033 Item Identifier"
label var ITEM_COUNT "1033 Unique Item Count per Shipment"
label var SHIP_COUNT "1033 Total Item Count per Shipment"
label var ITEM_VALUE "1033 Unique Item Value Total per Shipment"
label var SHIP_VALUE "1033 Total Item Value per Shipment"
label var DEMILCODE "1033 Demilitarization Code"
label var DEMILIC "1033 Integrity Code"

**SAVE 2021 QUARTER 3 
save "C:\NAMED_DIRECTORY\1033_StateData_2021_Q3.dta", replace
clear

********************************************************************************
**2021 QUARTER 4 - UNAVAILABLE
********************************************************************************
**WEBPAGE
*https://www.dla.mil/Disposition-Services/Offers/Law-Enforcement/Public-Information/
**EXCEL LINK
*https://www.dla.mil/Portals/104/Documents/DispositionServices/LESO/AllStatesAndTerritoriesQTR4FY21.xlsx

********************************************************************************
**2022 QUARTER 1
********************************************************************************
**WEBPAGE
*https://www.dla.mil/Disposition-Services/Offers/Law-Enforcement/Public-Information/
**EXCEL LINK
*https://www.dla.mil/Portals/104/Documents/DispositionServices/LESO/AllStatesAndTerritoriesQTR1FY22.xlsx

**MUST SAVE LINK SEPARATELY DUE TO EXCEL FORMAT WITH SHEETS (STATE SHEETS)
**DEVELOP LONGITUDINAL PANEL 1033 BY STATE/AGENCY
**NOTE ALL CAPS STATE NAMES - EXCEL PAGES
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q1.xlsx", sheet("ALABAMA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Alabama_1033_2022_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q1.xlsx", sheet("ALASKA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Alaska_1033_2022_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q1.xlsx", sheet("ARIZONA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Arizona_1033_2022_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q1.xlsx", sheet("ARKANSAS") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Arkansas_1033_2022_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q1.xlsx", sheet("CALIFORNIA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\California_1033_2022_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q1.xlsx", sheet("COLORADO") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Colorado_1033_2022_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q1.xlsx", sheet("CONNECTICUT") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Connecticut_1033_2022_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q1.xlsx", sheet("DELAWARE") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Delaware_1033_2022_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q1.xlsx", sheet("FLORIDA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Florida_1033_2022_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q1.xlsx", sheet("GEORGIA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Georgia_1033_2022_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q1.xlsx", sheet("GUAM") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Guam_1033_2022_Q1.dta", replace
clear
*import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q1.xlsx", sheet("Hawaii") firstrow
*save "C:\NAMED_DIRECTORY\1033_Data_States\Hawaii_1033_2022_Q1.dta", replace
*clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q1.xlsx", sheet("IDAHO") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Idaho_1033_2022_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q1.xlsx", sheet("ILLINOIS") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Illinois_1033_2022_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q1.xlsx", sheet("INDIANA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Indiana_1033_2022_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q1.xlsx", sheet("IOWA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Iowa_1033_2022_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q1.xlsx", sheet("KANSAS") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Kansas_1033_2022_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q1.xlsx", sheet("KENTUCKY") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Kentucky_1033_2022_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q1.xlsx", sheet("LOUISIANA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Louisiana_1033_2022_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q1.xlsx", sheet("MAINE") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Maine_1033_2022_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q1.xlsx", sheet("MARYLAND") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Maryland_1033_2022_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q1.xlsx", sheet("MASSACHUSETTS") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Massachusetts_1033_2022_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q1.xlsx", sheet("MICHIGAN") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Michigan_1033_2022_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q1.xlsx", sheet("MINNESOTA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Minnesota_1033_2022_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q1.xlsx", sheet("MISSISSIPPI") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Mississippi_1033_2022_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q1.xlsx", sheet("MISSOURI") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Missouri_1033_2022_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q1.xlsx", sheet("MONTANA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Montana_1033_2022_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q1.xlsx", sheet("NEBRASKA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Nebraska_1033_2022_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q1.xlsx", sheet("NEVADA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Nevada_1033_2022_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q1.xlsx", sheet("NEW HAMPSHIRE") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\NewHampshire_1033_2022_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q1.xlsx", sheet("NEW JERSEY") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\NewJersey_1033_2022_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q1.xlsx", sheet("NEW MEXICO") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\NewMexico_1033_2022_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q1.xlsx", sheet("NEW YORK") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\NewYork_1033_2022_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q1.xlsx", sheet("NORTH CAROLINA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\NorthCarolina_1033_2022_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q1.xlsx", sheet("NORTH DAKOTA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\NorthDakota_1033_2022_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q1.xlsx", sheet("NORTHERN MARIANA ISLANDS") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\NMIslands_1033_2022_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q1.xlsx", sheet("OHIO") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Ohio_1033_2022_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q1.xlsx", sheet("OKLAHOMA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Oklahoma_1033_2022_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q1.xlsx", sheet("OREGON") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Oregon_1033_2022_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q1.xlsx", sheet("PENNSYLVANIA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Pennsylvania_1033_2022_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q1.xlsx", sheet("PUERTO RICO") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\PRico_1033_2022_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q1.xlsx", sheet("RHODE ISLAND") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\RhodeIsland_1033_2022_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q1.xlsx", sheet("SOUTH CAROLINA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\SouthCarolina_1033_2022_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q1.xlsx", sheet("SOUTH DAKOTA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\SouthDakota_1033_2022_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q1.xlsx", sheet("TENNESSEE") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Tennessee_1033_2022_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q1.xlsx", sheet("TEXAS") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Texas_1033_2022_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q1.xlsx", sheet("UTAH") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Utah_1033_2022_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q1.xlsx", sheet("VERMONT") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Vermont_1033_2022_Q1.dta", replace
clear
**NOTE VIRGIN ISLANDS OF THE US - "VIRIGN ISLANDS"
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q1.xlsx", sheet("VIRGIN ISLANDS OF THE U.S.") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\VIUS_1033_2022_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q1.xlsx", sheet("VIRGINIA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Virginia_1033_2022_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q1.xlsx", sheet("WASHINGTON") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Washington_1033_2022_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q1.xlsx", sheet("WEST VIRGINIA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\WestVirginia_1033_2022_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q1.xlsx", sheet("WISCONSIN") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Wisconsin_1033_2022_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q1.xlsx", sheet("WYOMING") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Wyoming_1033_2022_Q1.dta", replace
clear

**APPEND STATE DATASETS TOGETHER
use "C:\NAMED_DIRECTORY\1033_Data_States\Alabama_1033_2022_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Alaska_1033_2022_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Arizona_1033_2022_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Arkansas_1033_2022_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\California_1033_2022_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Colorado_1033_2022_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Connecticut_1033_2022_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Delaware_1033_2022_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Florida_1033_2022_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Georgia_1033_2022_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Guam_1033_2022_Q1.dta"
*append using "C:\NAMED_DIRECTORY\1033_Data_States\Hawaii_1033_2022_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Idaho_1033_2022_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Illinois_1033_2022_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Indiana_1033_2022_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Iowa_1033_2022_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Kansas_1033_2022_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Kentucky_1033_2022_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Louisiana_1033_2022_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Maine_1033_2022_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Maryland_1033_2022_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Massachusetts_1033_2022_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Michigan_1033_2022_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Minnesota_1033_2022_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Mississippi_1033_2022_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Missouri_1033_2022_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Montana_1033_2022_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Nebraska_1033_2022_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Nevada_1033_2022_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\NewHampshire_1033_2022_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\NewJersey_1033_2022_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\NewMexico_1033_2022_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\NewYork_1033_2022_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\NorthCarolina_1033_2022_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\NorthDakota_1033_2022_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\NMIslands_1033_2022_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Ohio_1033_2022_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Oklahoma_1033_2022_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Oregon_1033_2022_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Pennsylvania_1033_2022_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\PRico_1033_2022_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\RhodeIsland_1033_2022_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\SouthCarolina_1033_2022_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\SouthDakota_1033_2022_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Tennessee_1033_2022_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Texas_1033_2022_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Utah_1033_2022_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Vermont_1033_2022_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Virginia_1033_2022_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\VIUS_1033_2022_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Washington_1033_2022_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\WestVirginia_1033_2022_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Wisconsin_1033_2022_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Wyoming_1033_2022_Q1.dta"

**SAVE 2022 QUARTER 1 
save "C:\NAMED_DIRECTORY\1033_StateData_2022_Q1.dta", replace
clear
use "C:\NAMED_DIRECTORY\1033_StateData_2022_Q1.dta"

**CREATE PANEL ID VARIABLES
order ShipDate, after(AgencyName)
sort State AgencyName ShipDate
egen AGENCY_ID = group(State AgencyName)
order AGENCY_ID, before(State)
label var AGENCY_ID "Agency Unique ID"

bysort AGENCY_ID ShipDate: gen SUBTIME_ID =_n
order SUBTIME_ID, after(AGENCY_ID)

gen TIME_ID = 0
order TIME_ID, before(SUBTIME_ID)
bysort AGENCY_ID SUBTIME_ID ShipDate: replace TIME_ID = _n
sort AGENCY_ID TIME_ID ShipDate SUBTIME_ID
label var TIME_ID "Agency Unique Shipment ID"

egen TIME_ID2 = tag(AGENCY_ID ShipDate)
order TIME_ID2, after(TIME_ID)
replace TIME_ID2 = . if TIME_ID2 == 0

gen TIME_ID3 = .
by AGENCY_ID: replace TIME_ID3 = sum(TIME_ID2)
order TIME_ID3, after(TIME_ID2)

drop TIME_ID TIME_ID2
gen TIME_ID = TIME_ID3
order TIME_ID, after(AGENCY_ID)
drop TIME_ID3

**SUM SAME ITEM QUANTITIES
egen SHIP_COUNT = sum(Quantity), by(AGENCY_ID TIME_ID)
order SHIP_COUNT, after(Quantity)

egen ITEM_COUNT = sum(Quantity), by(AGENCY_ID TIME_ID ItemName)
order ITEM_COUNT, after(Quantity)

**SUM ACQUISITION VALUES
egen ITEM_VALUE = sum(AcquisitionValue), by(AGENCY_ID TIME_ID ItemName)
order ITEM_VALUE, after(AcquisitionValue)

egen SHIP_VALUE = sum(ITEM_VALUE), by(AGENCY_ID TIME_ID)
order SHIP_VALUE, after(ITEM_VALUE)

**DROP ADDITIONALS AND DUPLICATES
**CAN MERGE BACK IN SOURCE QUARTERS LATER
drop Quantity NSN SUBTIME_ID UI AcquisitionValue StationType
duplicates drop 
gen QTR = "2022-1"
order QTR, after(TIME_ID)

**GEN ITEM ID
sort AGENCY_ID TIME_ID ItemName QTR
by AGENCY_ID TIME_ID ItemName: gen ITEM_ID = _n
order ITEM_ID, after(TIME_ID)
drop if AGENCY_ID == .

**LABEL VARS
rename *, upper
label var SHIPDATE "Date Items Shipped"
label var TIME_ID "Agency Shipment Unique ID"
label var ITEM_ID "Agency Shipment Item Unique ID"
label var QTR "1033 Quarter Identifier"
label var AGENCYNAME "Agency Name"
label var STATE "Agency Associated State"
label var ITEMNAME "1033 Item Identifier"
label var ITEM_COUNT "1033 Unique Item Count per Shipment"
label var SHIP_COUNT "1033 Total Item Count per Shipment"
label var ITEM_VALUE "1033 Unique Item Value Total per Shipment"
label var SHIP_VALUE "1033 Total Item Value per Shipment"
label var DEMILCODE "1033 Demilitarization Code"
label var DEMILIC "1033 Integrity Code"

**SAVE 2022 QUARTER 1 
save "C:\NAMED_DIRECTORY\1033_StateData_2022_Q1.dta", replace
clear

********************************************************************************
**2022 QUARTER 2
********************************************************************************
**WEBPAGE
*https://www.dla.mil/Disposition-Services/Offers/Law-Enforcement/Public-Information/
**EXCEL LINK
*https://www.dla.mil/Portals/104/Documents/DispositionServices/LESO/AllStatesAndTerritoriesQTR2FY22.xlsx

**MUST SAVE LINK SEPARATELY DUE TO EXCEL FORMAT WITH SHEETS (STATE SHEETS)
**DEVELOP LONGITUDINAL PANEL 1033 BY STATE/AGENCY
**NOTE ALL CAPS STATE NAMES - EXCEL PAGES
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q2.xlsx", sheet("ALABAMA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Alabama_1033_2022_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q2.xlsx", sheet("ALASKA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Alaska_1033_2022_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q2.xlsx", sheet("ARIZONA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Arizona_1033_2022_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q2.xlsx", sheet("ARKANSAS") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Arkansas_1033_2022_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q2.xlsx", sheet("CALIFORNIA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\California_1033_2022_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q2.xlsx", sheet("COLORADO") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Colorado_1033_2022_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q2.xlsx", sheet("CONNECTICUT") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Connecticut_1033_2022_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q2.xlsx", sheet("DELAWARE") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Delaware_1033_2022_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q2.xlsx", sheet("FLORIDA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Florida_1033_2022_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q2.xlsx", sheet("GEORGIA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Georgia_1033_2022_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q2.xlsx", sheet("GUAM") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Guam_1033_2022_Q2.dta", replace
clear
*import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q2.xlsx", sheet("Hawaii") firstrow
*save "C:\NAMED_DIRECTORY\1033_Data_States\Hawaii_1033_2022_Q2.dta", replace
*clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q2.xlsx", sheet("IDAHO") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Idaho_1033_2022_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q2.xlsx", sheet("ILLINOIS") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Illinois_1033_2022_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q2.xlsx", sheet("INDIANA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Indiana_1033_2022_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q2.xlsx", sheet("IOWA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Iowa_1033_2022_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q2.xlsx", sheet("KANSAS") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Kansas_1033_2022_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q2.xlsx", sheet("KENTUCKY") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Kentucky_1033_2022_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q2.xlsx", sheet("LOUISIANA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Louisiana_1033_2022_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q2.xlsx", sheet("MAINE") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Maine_1033_2022_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q2.xlsx", sheet("MARYLAND") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Maryland_1033_2022_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q2.xlsx", sheet("MASSACHUSETTS") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Massachusetts_1033_2022_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q2.xlsx", sheet("MICHIGAN") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Michigan_1033_2022_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q2.xlsx", sheet("MINNESOTA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Minnesota_1033_2022_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q2.xlsx", sheet("MISSISSIPPI") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Mississippi_1033_2022_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q2.xlsx", sheet("MISSOURI") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Missouri_1033_2022_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q2.xlsx", sheet("MONTANA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Montana_1033_2022_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q2.xlsx", sheet("NEBRASKA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Nebraska_1033_2022_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q2.xlsx", sheet("NEVADA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Nevada_1033_2022_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q2.xlsx", sheet("NEW HAMPSHIRE") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\NewHampshire_1033_2022_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q2.xlsx", sheet("NEW JERSEY") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\NewJersey_1033_2022_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q2.xlsx", sheet("NEW MEXICO") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\NewMexico_1033_2022_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q2.xlsx", sheet("NEW YORK") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\NewYork_1033_2022_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q2.xlsx", sheet("NORTH CAROLINA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\NorthCarolina_1033_2022_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q2.xlsx", sheet("NORTH DAKOTA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\NorthDakota_1033_2022_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q2.xlsx", sheet("NORTHERN MARIANA ISLANDS") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\NMIslands_1033_2022_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q2.xlsx", sheet("OHIO") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Ohio_1033_2022_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q2.xlsx", sheet("OKLAHOMA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Oklahoma_1033_2022_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q2.xlsx", sheet("OREGON") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Oregon_1033_2022_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q2.xlsx", sheet("PENNSYLVANIA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Pennsylvania_1033_2022_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q2.xlsx", sheet("PUERTO RICO") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\PRico_1033_2022_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q2.xlsx", sheet("RHODE ISLAND") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\RhodeIsland_1033_2022_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q2.xlsx", sheet("SOUTH CAROLINA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\SouthCarolina_1033_2022_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q2.xlsx", sheet("SOUTH DAKOTA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\SouthDakota_1033_2022_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q2.xlsx", sheet("TENNESSEE") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Tennessee_1033_2022_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q2.xlsx", sheet("TEXAS") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Texas_1033_2022_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q2.xlsx", sheet("UTAH") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Utah_1033_2022_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q2.xlsx", sheet("VERMONT") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Vermont_1033_2022_Q2.dta", replace
clear
**NOTE VIRGIN ISLANDS OF THE US - "VIRIGN ISLANDS"
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q2.xlsx", sheet("VIRGIN ISLANDS OF THE U.S.") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\VIUS_1033_2022_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q2.xlsx", sheet("VIRGINIA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Virginia_1033_2022_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q2.xlsx", sheet("WASHINGTON") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Washington_1033_2022_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q2.xlsx", sheet("WEST VIRGINIA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\WestVirginia_1033_2022_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q2.xlsx", sheet("WISCONSIN") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Wisconsin_1033_2022_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q2.xlsx", sheet("WYOMING") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Wyoming_1033_2022_Q2.dta", replace
clear

**APPEND STATE DATASETS TOGETHER
use "C:\NAMED_DIRECTORY\1033_Data_States\Alabama_1033_2022_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Alaska_1033_2022_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Arizona_1033_2022_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Arkansas_1033_2022_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\California_1033_2022_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Colorado_1033_2022_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Connecticut_1033_2022_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Delaware_1033_2022_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Florida_1033_2022_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Georgia_1033_2022_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Guam_1033_2022_Q2.dta"
*append using "C:\NAMED_DIRECTORY\1033_Data_States\Hawaii_1033_2022_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Idaho_1033_2022_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Illinois_1033_2022_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Indiana_1033_2022_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Iowa_1033_2022_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Kansas_1033_2022_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Kentucky_1033_2022_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Louisiana_1033_2022_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Maine_1033_2022_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Maryland_1033_2022_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Massachusetts_1033_2022_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Michigan_1033_2022_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Minnesota_1033_2022_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Mississippi_1033_2022_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Missouri_1033_2022_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Montana_1033_2022_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Nebraska_1033_2022_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Nevada_1033_2022_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\NewHampshire_1033_2022_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\NewJersey_1033_2022_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\NewMexico_1033_2022_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\NewYork_1033_2022_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\NorthCarolina_1033_2022_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\NorthDakota_1033_2022_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\NMIslands_1033_2022_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Ohio_1033_2022_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Oklahoma_1033_2022_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Oregon_1033_2022_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Pennsylvania_1033_2022_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\PRico_1033_2022_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\RhodeIsland_1033_2022_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\SouthCarolina_1033_2022_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\SouthDakota_1033_2022_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Tennessee_1033_2022_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Texas_1033_2022_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Utah_1033_2022_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Vermont_1033_2022_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Virginia_1033_2022_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\VIUS_1033_2022_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Washington_1033_2022_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\WestVirginia_1033_2022_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Wisconsin_1033_2022_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Wyoming_1033_2022_Q2.dta"

**SAVE 2022 QUARTER 2 
save "C:\NAMED_DIRECTORY\1033_StateData_2022_Q2.dta", replace
clear
use "C:\NAMED_DIRECTORY\1033_StateData_2022_Q2.dta"

**CREATE PANEL ID VARIABLES
order ShipDate, after(AgencyName)
sort State AgencyName ShipDate
egen AGENCY_ID = group(State AgencyName)
order AGENCY_ID, before(State)
label var AGENCY_ID "Agency Unique ID"

bysort AGENCY_ID ShipDate: gen SUBTIME_ID =_n
order SUBTIME_ID, after(AGENCY_ID)

gen TIME_ID = 0
order TIME_ID, before(SUBTIME_ID)
bysort AGENCY_ID SUBTIME_ID ShipDate: replace TIME_ID = _n
sort AGENCY_ID TIME_ID ShipDate SUBTIME_ID
label var TIME_ID "Agency Unique Shipment ID"

egen TIME_ID2 = tag(AGENCY_ID ShipDate)
order TIME_ID2, after(TIME_ID)
replace TIME_ID2 = . if TIME_ID2 == 0

gen TIME_ID3 = .
by AGENCY_ID: replace TIME_ID3 = sum(TIME_ID2)
order TIME_ID3, after(TIME_ID2)

drop TIME_ID TIME_ID2
gen TIME_ID = TIME_ID3
order TIME_ID, after(AGENCY_ID)
drop TIME_ID3

**SUM SAME ITEM QUANTITIES
egen SHIP_COUNT = sum(Quantity), by(AGENCY_ID TIME_ID)
order SHIP_COUNT, after(Quantity)

egen ITEM_COUNT = sum(Quantity), by(AGENCY_ID TIME_ID ItemName)
order ITEM_COUNT, after(Quantity)

**SUM ACQUISITION VALUES
egen ITEM_VALUE = sum(AcquisitionValue), by(AGENCY_ID TIME_ID ItemName)
order ITEM_VALUE, after(AcquisitionValue)

egen SHIP_VALUE = sum(ITEM_VALUE), by(AGENCY_ID TIME_ID)
order SHIP_VALUE, after(ITEM_VALUE)

**DROP ADDITIONALS AND DUPLICATES
**CAN MERGE BACK IN SOURCE QUARTERS LATER
drop Quantity NSN SUBTIME_ID UI AcquisitionValue StationType
duplicates drop 
gen QTR = "2022-2"
order QTR, after(TIME_ID)

**GEN ITEM ID
sort AGENCY_ID TIME_ID ItemName QTR
by AGENCY_ID TIME_ID ItemName: gen ITEM_ID = _n
order ITEM_ID, after(TIME_ID)
drop if AGENCY_ID == .

**LABEL VARS
rename *, upper
label var SHIPDATE "Date Items Shipped"
label var TIME_ID "Agency Shipment Unique ID"
label var ITEM_ID "Agency Shipment Item Unique ID"
label var QTR "1033 Quarter Identifier"
label var AGENCYNAME "Agency Name"
label var STATE "Agency Associated State"
label var ITEMNAME "1033 Item Identifier"
label var ITEM_COUNT "1033 Unique Item Count per Shipment"
label var SHIP_COUNT "1033 Total Item Count per Shipment"
label var ITEM_VALUE "1033 Unique Item Value Total per Shipment"
label var SHIP_VALUE "1033 Total Item Value per Shipment"
label var DEMILCODE "1033 Demilitarization Code"
label var DEMILIC "1033 Integrity Code"

**SAVE 2022 QUARTER 2 
save "C:\NAMED_DIRECTORY\1033_StateData_2022_Q2.dta", replace
clear

********************************************************************************
**2022 QUARTER 3 - UNAVAILABLE
********************************************************************************
**WEBPAGE
*https://www.dla.mil/Disposition-Services/Offers/Law-Enforcement/Public-Information/
**EXCEL LINK
*https://www.dla.mil/Portals/104/Documents/DispositionServices/LESO/AllStatesAndTerritoriesQTR3FY22.xlsx

********************************************************************************
**2022 QUARTER 4
********************************************************************************
**WEBPAGE
*https://www.dla.mil/Disposition-Services/Offers/Law-Enforcement/Public-Information/
**EXCEL LINK
*https://www.dla.mil/Portals/104/Documents/DispositionServices/LESO/AllStatesAndTerritoriesQTR4FY22.xlsx

**MUST SAVE LINK SEPARATELY DUE TO EXCEL FORMAT WITH SHEETS (STATE SHEETS)
**DEVELOP LONGITUDINAL PANEL 1033 BY STATE/AGENCY
**NOTE ALL CAPS STATE NAMES - EXCEL PAGES
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q4.xlsx", sheet("ALABAMA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Alabama_1033_2022_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q4.xlsx", sheet("ALASKA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Alaska_1033_2022_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q4.xlsx", sheet("ARIZONA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Arizona_1033_2022_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q4.xlsx", sheet("ARKANSAS") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Arkansas_1033_2022_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q4.xlsx", sheet("CALIFORNIA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\California_1033_2022_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q4.xlsx", sheet("COLORADO") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Colorado_1033_2022_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q4.xlsx", sheet("CONNECTICUT") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Connecticut_1033_2022_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q4.xlsx", sheet("DELAWARE") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Delaware_1033_2022_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q4.xlsx", sheet("FLORIDA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Florida_1033_2022_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q4.xlsx", sheet("GEORGIA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Georgia_1033_2022_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q4.xlsx", sheet("GUAM") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Guam_1033_2022_Q4.dta", replace
clear
*import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q4.xlsx", sheet("Hawaii") firstrow
*save "C:\NAMED_DIRECTORY\1033_Data_States\Hawaii_1033_2022_Q4.dta", replace
*clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q4.xlsx", sheet("IDAHO") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Idaho_1033_2022_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q4.xlsx", sheet("ILLINOIS") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Illinois_1033_2022_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q4.xlsx", sheet("INDIANA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Indiana_1033_2022_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q4.xlsx", sheet("IOWA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Iowa_1033_2022_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q4.xlsx", sheet("KANSAS") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Kansas_1033_2022_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q4.xlsx", sheet("KENTUCKY") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Kentucky_1033_2022_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q4.xlsx", sheet("LOUISIANA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Louisiana_1033_2022_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q4.xlsx", sheet("MAINE") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Maine_1033_2022_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q4.xlsx", sheet("MARYLAND") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Maryland_1033_2022_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q4.xlsx", sheet("MASSACHUSETTS") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Massachusetts_1033_2022_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q4.xlsx", sheet("MICHIGAN") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Michigan_1033_2022_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q4.xlsx", sheet("MINNESOTA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Minnesota_1033_2022_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q4.xlsx", sheet("MISSISSIPPI") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Mississippi_1033_2022_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q4.xlsx", sheet("MISSOURI") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Missouri_1033_2022_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q4.xlsx", sheet("MONTANA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Montana_1033_2022_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q4.xlsx", sheet("NEBRASKA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Nebraska_1033_2022_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q4.xlsx", sheet("NEVADA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Nevada_1033_2022_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q4.xlsx", sheet("NEW HAMPSHIRE") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\NewHampshire_1033_2022_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q4.xlsx", sheet("NEW JERSEY") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\NewJersey_1033_2022_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q4.xlsx", sheet("NEW MEXICO") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\NewMexico_1033_2022_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q4.xlsx", sheet("NEW YORK") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\NewYork_1033_2022_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q4.xlsx", sheet("NORTH CAROLINA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\NorthCarolina_1033_2022_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q4.xlsx", sheet("NORTH DAKOTA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\NorthDakota_1033_2022_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q4.xlsx", sheet("NORTHERN MARIANA ISLANDS") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\NMIslands_1033_2022_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q4.xlsx", sheet("OHIO") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Ohio_1033_2022_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q4.xlsx", sheet("OKLAHOMA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Oklahoma_1033_2022_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q4.xlsx", sheet("OREGON") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Oregon_1033_2022_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q4.xlsx", sheet("PENNSYLVANIA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Pennsylvania_1033_2022_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q4.xlsx", sheet("PUERTO RICO") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\PRico_1033_2022_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q4.xlsx", sheet("RHODE ISLAND") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\RhodeIsland_1033_2022_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q4.xlsx", sheet("SOUTH CAROLINA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\SouthCarolina_1033_2022_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q4.xlsx", sheet("SOUTH DAKOTA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\SouthDakota_1033_2022_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q4.xlsx", sheet("TENNESSEE") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Tennessee_1033_2022_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q4.xlsx", sheet("TEXAS") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Texas_1033_2022_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q4.xlsx", sheet("UTAH") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Utah_1033_2022_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q4.xlsx", sheet("VERMONT") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Vermont_1033_2022_Q4.dta", replace
clear
**NOTE VIRGIN ISLANDS OF THE US - "VIRIGN ISLANDS"
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q4.xlsx", sheet("VIRGIN ISLANDS OF THE U.S.") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\VIUS_1033_2022_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q4.xlsx", sheet("VIRGINIA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Virginia_1033_2022_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q4.xlsx", sheet("WASHINGTON") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Washington_1033_2022_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q4.xlsx", sheet("WEST VIRGINIA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\WestVirginia_1033_2022_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q4.xlsx", sheet("WISCONSIN") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Wisconsin_1033_2022_Q4.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY22Q4.xlsx", sheet("WYOMING") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Wyoming_1033_2022_Q4.dta", replace
clear

**APPEND STATE DATASETS TOGETHER
use "C:\NAMED_DIRECTORY\1033_Data_States\Alabama_1033_2022_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Alaska_1033_2022_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Arizona_1033_2022_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Arkansas_1033_2022_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\California_1033_2022_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Colorado_1033_2022_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Connecticut_1033_2022_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Delaware_1033_2022_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Florida_1033_2022_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Georgia_1033_2022_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Guam_1033_2022_Q4.dta"
*append using "C:\NAMED_DIRECTORY\1033_Data_States\Hawaii_1033_2022_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Idaho_1033_2022_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Illinois_1033_2022_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Indiana_1033_2022_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Iowa_1033_2022_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Kansas_1033_2022_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Kentucky_1033_2022_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Louisiana_1033_2022_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Maine_1033_2022_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Maryland_1033_2022_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Massachusetts_1033_2022_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Michigan_1033_2022_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Minnesota_1033_2022_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Mississippi_1033_2022_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Missouri_1033_2022_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Montana_1033_2022_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Nebraska_1033_2022_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Nevada_1033_2022_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\NewHampshire_1033_2022_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\NewJersey_1033_2022_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\NewMexico_1033_2022_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\NewYork_1033_2022_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\NorthCarolina_1033_2022_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\NorthDakota_1033_2022_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\NMIslands_1033_2022_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Ohio_1033_2022_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Oklahoma_1033_2022_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Oregon_1033_2022_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Pennsylvania_1033_2022_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\PRico_1033_2022_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\RhodeIsland_1033_2022_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\SouthCarolina_1033_2022_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\SouthDakota_1033_2022_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Tennessee_1033_2022_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Texas_1033_2022_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Utah_1033_2022_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Vermont_1033_2022_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Virginia_1033_2022_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\VIUS_1033_2022_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Washington_1033_2022_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\WestVirginia_1033_2022_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Wisconsin_1033_2022_Q4.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Wyoming_1033_2022_Q4.dta"

**SAVE 2022 QUARTER 4 
save "C:\NAMED_DIRECTORY\1033_StateData_2022_Q4.dta", replace
clear
use "C:\NAMED_DIRECTORY\1033_StateData_2022_Q4.dta"

**CREATE PANEL ID VARIABLES
order ShipDate, after(AgencyName)
sort State AgencyName ShipDate
egen AGENCY_ID = group(State AgencyName)
order AGENCY_ID, before(State)
label var AGENCY_ID "Agency Unique ID"

bysort AGENCY_ID ShipDate: gen SUBTIME_ID =_n
order SUBTIME_ID, after(AGENCY_ID)

gen TIME_ID = 0
order TIME_ID, before(SUBTIME_ID)
bysort AGENCY_ID SUBTIME_ID ShipDate: replace TIME_ID = _n
sort AGENCY_ID TIME_ID ShipDate SUBTIME_ID
label var TIME_ID "Agency Unique Shipment ID"

egen TIME_ID2 = tag(AGENCY_ID ShipDate)
order TIME_ID2, after(TIME_ID)
replace TIME_ID2 = . if TIME_ID2 == 0

gen TIME_ID3 = .
by AGENCY_ID: replace TIME_ID3 = sum(TIME_ID2)
order TIME_ID3, after(TIME_ID2)

drop TIME_ID TIME_ID2
gen TIME_ID = TIME_ID3
order TIME_ID, after(AGENCY_ID)
drop TIME_ID3

**SUM SAME ITEM QUANTITIES
egen SHIP_COUNT = sum(Quantity), by(AGENCY_ID TIME_ID)
order SHIP_COUNT, after(Quantity)

egen ITEM_COUNT = sum(Quantity), by(AGENCY_ID TIME_ID ItemName)
order ITEM_COUNT, after(Quantity)

**SUM ACQUISITION VALUES
egen ITEM_VALUE = sum(AcquisitionValue), by(AGENCY_ID TIME_ID ItemName)
order ITEM_VALUE, after(AcquisitionValue)

egen SHIP_VALUE = sum(ITEM_VALUE), by(AGENCY_ID TIME_ID)
order SHIP_VALUE, after(ITEM_VALUE)

**DROP ADDITIONALS AND DUPLICATES
**CAN MERGE BACK IN SOURCE QUARTERS LATER
drop Quantity NSN SUBTIME_ID UI AcquisitionValue StationType
duplicates drop 
gen QTR = "2022-4"
order QTR, after(TIME_ID)

**GEN ITEM ID
sort AGENCY_ID TIME_ID ItemName QTR
by AGENCY_ID TIME_ID ItemName: gen ITEM_ID = _n
order ITEM_ID, after(TIME_ID)
drop if AGENCY_ID == .

**LABEL VARS
rename *, upper
label var SHIPDATE "Date Items Shipped"
label var TIME_ID "Agency Shipment Unique ID"
label var ITEM_ID "Agency Shipment Item Unique ID"
label var QTR "1033 Quarter Identifier"
label var AGENCYNAME "Agency Name"
label var STATE "Agency Associated State"
label var ITEMNAME "1033 Item Identifier"
label var ITEM_COUNT "1033 Unique Item Count per Shipment"
label var SHIP_COUNT "1033 Total Item Count per Shipment"
label var ITEM_VALUE "1033 Unique Item Value Total per Shipment"
label var SHIP_VALUE "1033 Total Item Value per Shipment"
label var DEMILCODE "1033 Demilitarization Code"
label var DEMILIC "1033 Integrity Code"

**SAVE 2022 QUARTER 4 
save "C:\NAMED_DIRECTORY\1033_StateData_2022_Q4.dta", replace
clear

********************************************************************************
**2023 QUARTER 1
********************************************************************************
**WEBPAGE
*https://www.dla.mil/Disposition-Services/Offers/Law-Enforcement/Public-Information/
**EXCEL LINK
*https://www.dla.mil/Portals/104/Documents/DispositionServices/LESO/AllStatesAndTerritoriesQTR1FY23.xlsx

**MUST SAVE LINK SEPARATELY DUE TO EXCEL FORMAT WITH SHEETS (STATE SHEETS)
**DEVELOP LONGITUDINAL PANEL 1033 BY STATE/AGENCY
**NOTE ALL CAPS STATE NAMES - EXCEL PAGES
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q1.xlsx", sheet("ALABAMA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Alabama_1033_2023_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q1.xlsx", sheet("ALASKA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Alaska_1033_2023_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q1.xlsx", sheet("ARIZONA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Arizona_1033_2023_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q1.xlsx", sheet("ARKANSAS") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Arkansas_1033_2023_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q1.xlsx", sheet("CALIFORNIA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\California_1033_2023_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q1.xlsx", sheet("COLORADO") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Colorado_1033_2023_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q1.xlsx", sheet("CONNECTICUT") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Connecticut_1033_2023_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q1.xlsx", sheet("DELAWARE") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Delaware_1033_2023_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q1.xlsx", sheet("FLORIDA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Florida_1033_2023_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q1.xlsx", sheet("GEORGIA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Georgia_1033_2023_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q1.xlsx", sheet("GUAM") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Guam_1033_2023_Q1.dta", replace
clear
*import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q1.xlsx", sheet("Hawaii") firstrow
*save "C:\NAMED_DIRECTORY\1033_Data_States\Hawaii_1033_2023_Q1.dta", replace
*clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q1.xlsx", sheet("IDAHO") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Idaho_1033_2023_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q1.xlsx", sheet("ILLINOIS") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Illinois_1033_2023_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q1.xlsx", sheet("INDIANA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Indiana_1033_2023_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q1.xlsx", sheet("IOWA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Iowa_1033_2023_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q1.xlsx", sheet("KANSAS") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Kansas_1033_2023_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q1.xlsx", sheet("KENTUCKY") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Kentucky_1033_2023_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q1.xlsx", sheet("LOUISIANA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Louisiana_1033_2023_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q1.xlsx", sheet("MAINE") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Maine_1033_2023_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q1.xlsx", sheet("MARYLAND") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Maryland_1033_2023_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q1.xlsx", sheet("MASSACHUSETTS") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Massachusetts_1033_2023_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q1.xlsx", sheet("MICHIGAN") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Michigan_1033_2023_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q1.xlsx", sheet("MINNESOTA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Minnesota_1033_2023_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q1.xlsx", sheet("MISSISSIPPI") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Mississippi_1033_2023_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q1.xlsx", sheet("MISSOURI") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Missouri_1033_2023_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q1.xlsx", sheet("MONTANA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Montana_1033_2023_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q1.xlsx", sheet("NEBRASKA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Nebraska_1033_2023_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q1.xlsx", sheet("NEVADA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Nevada_1033_2023_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q1.xlsx", sheet("NEW HAMPSHIRE") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\NewHampshire_1033_2023_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q1.xlsx", sheet("NEW JERSEY") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\NewJersey_1033_2023_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q1.xlsx", sheet("NEW MEXICO") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\NewMexico_1033_2023_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q1.xlsx", sheet("NEW YORK") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\NewYork_1033_2023_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q1.xlsx", sheet("NORTH CAROLINA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\NorthCarolina_1033_2023_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q1.xlsx", sheet("NORTH DAKOTA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\NorthDakota_1033_2023_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q1.xlsx", sheet("NORTHERN MARIANA ISLANDS") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\NMIslands_1033_2023_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q1.xlsx", sheet("OHIO") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Ohio_1033_2023_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q1.xlsx", sheet("OKLAHOMA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Oklahoma_1033_2023_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q1.xlsx", sheet("OREGON") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Oregon_1033_2023_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q1.xlsx", sheet("PENNSYLVANIA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Pennsylvania_1033_2023_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q1.xlsx", sheet("PUERTO RICO") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\PRico_1033_2023_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q1.xlsx", sheet("RHODE ISLAND") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\RhodeIsland_1033_2023_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q1.xlsx", sheet("SOUTH CAROLINA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\SouthCarolina_1033_2023_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q1.xlsx", sheet("SOUTH DAKOTA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\SouthDakota_1033_2023_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q1.xlsx", sheet("TENNESSEE") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Tennessee_1033_2023_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q1.xlsx", sheet("TEXAS") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Texas_1033_2023_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q1.xlsx", sheet("UTAH") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Utah_1033_2023_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q1.xlsx", sheet("VERMONT") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Vermont_1033_2023_Q1.dta", replace
clear
**NOTE VIRGIN ISLANDS OF THE US - "VIRIGN ISLANDS"
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q1.xlsx", sheet("VIRGIN ISLANDS OF THE U.S.") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\VIUS_1033_2023_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q1.xlsx", sheet("VIRGINIA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Virginia_1033_2023_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q1.xlsx", sheet("WASHINGTON") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Washington_1033_2023_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q1.xlsx", sheet("WEST VIRGINIA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\WestVirginia_1033_2023_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q1.xlsx", sheet("WISCONSIN") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Wisconsin_1033_2023_Q1.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q1.xlsx", sheet("WYOMING") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Wyoming_1033_2023_Q1.dta", replace
clear

**APPEND STATE DATASETS TOGETHER
use "C:\NAMED_DIRECTORY\1033_Data_States\Alabama_1033_2023_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Alaska_1033_2023_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Arizona_1033_2023_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Arkansas_1033_2023_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\California_1033_2023_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Colorado_1033_2023_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Connecticut_1033_2023_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Delaware_1033_2023_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Florida_1033_2023_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Georgia_1033_2023_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Guam_1033_2023_Q1.dta"
*append using "C:\NAMED_DIRECTORY\1033_Data_States\Hawaii_1033_2023_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Idaho_1033_2023_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Illinois_1033_2023_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Indiana_1033_2023_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Iowa_1033_2023_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Kansas_1033_2023_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Kentucky_1033_2023_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Louisiana_1033_2023_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Maine_1033_2023_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Maryland_1033_2023_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Massachusetts_1033_2023_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Michigan_1033_2023_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Minnesota_1033_2023_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Mississippi_1033_2023_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Missouri_1033_2023_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Montana_1033_2023_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Nebraska_1033_2023_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Nevada_1033_2023_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\NewHampshire_1033_2023_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\NewJersey_1033_2023_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\NewMexico_1033_2023_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\NewYork_1033_2023_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\NorthCarolina_1033_2023_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\NorthDakota_1033_2023_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\NMIslands_1033_2023_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Ohio_1033_2023_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Oklahoma_1033_2023_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Oregon_1033_2023_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Pennsylvania_1033_2023_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\PRico_1033_2023_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\RhodeIsland_1033_2023_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\SouthCarolina_1033_2023_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\SouthDakota_1033_2023_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Tennessee_1033_2023_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Texas_1033_2023_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Utah_1033_2023_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Vermont_1033_2023_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Virginia_1033_2023_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\VIUS_1033_2023_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Washington_1033_2023_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\WestVirginia_1033_2023_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Wisconsin_1033_2023_Q1.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Wyoming_1033_2023_Q1.dta"

**SAVE 2023 QUARTER 1 
save "C:\NAMED_DIRECTORY\1033_StateData_2023_Q1.dta", replace
clear
use "C:\NAMED_DIRECTORY\1033_StateData_2023_Q1.dta"

**CREATE PANEL ID VARIABLES
order ShipDate, after(AgencyName)
sort State AgencyName ShipDate
egen AGENCY_ID = group(State AgencyName)
order AGENCY_ID, before(State)
label var AGENCY_ID "Agency Unique ID"

bysort AGENCY_ID ShipDate: gen SUBTIME_ID =_n
order SUBTIME_ID, after(AGENCY_ID)

gen TIME_ID = 0
order TIME_ID, before(SUBTIME_ID)
bysort AGENCY_ID SUBTIME_ID ShipDate: replace TIME_ID = _n
sort AGENCY_ID TIME_ID ShipDate SUBTIME_ID
label var TIME_ID "Agency Unique Shipment ID"

egen TIME_ID2 = tag(AGENCY_ID ShipDate)
order TIME_ID2, after(TIME_ID)
replace TIME_ID2 = . if TIME_ID2 == 0

gen TIME_ID3 = .
by AGENCY_ID: replace TIME_ID3 = sum(TIME_ID2)
order TIME_ID3, after(TIME_ID2)

drop TIME_ID TIME_ID2
gen TIME_ID = TIME_ID3
order TIME_ID, after(AGENCY_ID)
drop TIME_ID3

**SUM SAME ITEM QUANTITIES
egen SHIP_COUNT = sum(Quantity), by(AGENCY_ID TIME_ID)
order SHIP_COUNT, after(Quantity)

egen ITEM_COUNT = sum(Quantity), by(AGENCY_ID TIME_ID ItemName)
order ITEM_COUNT, after(Quantity)

**SUM ACQUISITION VALUES
egen ITEM_VALUE = sum(AcquisitionValue), by(AGENCY_ID TIME_ID ItemName)
order ITEM_VALUE, after(AcquisitionValue)

egen SHIP_VALUE = sum(ITEM_VALUE), by(AGENCY_ID TIME_ID)
order SHIP_VALUE, after(ITEM_VALUE)

**DROP ADDITIONALS AND DUPLICATES
**CAN MERGE BACK IN SOURCE QUARTERS LATER
drop Quantity NSN SUBTIME_ID UI AcquisitionValue StationType
duplicates drop 
gen QTR = "2023-1"
order QTR, after(TIME_ID)

**GEN ITEM ID
sort AGENCY_ID TIME_ID ItemName QTR
by AGENCY_ID TIME_ID ItemName: gen ITEM_ID = _n
order ITEM_ID, after(TIME_ID)
drop if AGENCY_ID == .

**LABEL VARS
rename *, upper
label var SHIPDATE "Date Items Shipped"
label var TIME_ID "Agency Shipment Unique ID"
label var ITEM_ID "Agency Shipment Item Unique ID"
label var QTR "1033 Quarter Identifier"
label var AGENCYNAME "Agency Name"
label var STATE "Agency Associated State"
label var ITEMNAME "1033 Item Identifier"
label var ITEM_COUNT "1033 Unique Item Count per Shipment"
label var SHIP_COUNT "1033 Total Item Count per Shipment"
label var ITEM_VALUE "1033 Unique Item Value Total per Shipment"
label var SHIP_VALUE "1033 Total Item Value per Shipment"
label var DEMILCODE "1033 Demilitarization Code"
label var DEMILIC "1033 Integrity Code"

**SAVE 2023 QUARTER 1 
save "C:\NAMED_DIRECTORY\1033_StateData_2023_Q1.dta", replace
clear

********************************************************************************
**2023 QUARTER 2
********************************************************************************
**WEBPAGE
*https://www.dla.mil/Disposition-Services/Offers/Law-Enforcement/Public-Information/
**EXCEL LINK
*https://www.dla.mil/Portals/104/Documents/DispositionServices/LESO/AllStatesAndTerritoriesQTR2FY23.xlsx

**MUST SAVE LINK SEPARATELY DUE TO EXCEL FORMAT WITH SHEETS (STATE SHEETS)
**DEVELOP LONGITUDINAL PANEL 1033 BY STATE/AGENCY
**NOTE ALL CAPS STATE NAMES - EXCEL PAGES
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q2.xlsx", sheet("ALABAMA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Alabama_1033_2023_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q2.xlsx", sheet("ALASKA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Alaska_1033_2023_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q2.xlsx", sheet("ARIZONA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Arizona_1033_2023_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q2.xlsx", sheet("ARKANSAS") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Arkansas_1033_2023_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q2.xlsx", sheet("CALIFORNIA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\California_1033_2023_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q2.xlsx", sheet("COLORADO") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Colorado_1033_2023_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q2.xlsx", sheet("CONNECTICUT") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Connecticut_1033_2023_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q2.xlsx", sheet("DELAWARE") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Delaware_1033_2023_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q2.xlsx", sheet("FLORIDA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Florida_1033_2023_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q2.xlsx", sheet("GEORGIA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Georgia_1033_2023_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q2.xlsx", sheet("GUAM") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Guam_1033_2023_Q2.dta", replace
clear
*import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q2.xlsx", sheet("Hawaii") firstrow
*save "C:\NAMED_DIRECTORY\1033_Data_States\Hawaii_1033_2023_Q2.dta", replace
*clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q2.xlsx", sheet("IDAHO") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Idaho_1033_2023_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q2.xlsx", sheet("ILLINOIS") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Illinois_1033_2023_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q2.xlsx", sheet("INDIANA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Indiana_1033_2023_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q2.xlsx", sheet("IOWA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Iowa_1033_2023_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q2.xlsx", sheet("KANSAS") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Kansas_1033_2023_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q2.xlsx", sheet("KENTUCKY") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Kentucky_1033_2023_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q2.xlsx", sheet("LOUISIANA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Louisiana_1033_2023_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q2.xlsx", sheet("MAINE") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Maine_1033_2023_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q2.xlsx", sheet("MARYLAND") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Maryland_1033_2023_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q2.xlsx", sheet("MASSACHUSETTS") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Massachusetts_1033_2023_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q2.xlsx", sheet("MICHIGAN") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Michigan_1033_2023_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q2.xlsx", sheet("MINNESOTA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Minnesota_1033_2023_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q2.xlsx", sheet("MISSISSIPPI") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Mississippi_1033_2023_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q2.xlsx", sheet("MISSOURI") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Missouri_1033_2023_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q2.xlsx", sheet("MONTANA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Montana_1033_2023_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q2.xlsx", sheet("NEBRASKA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Nebraska_1033_2023_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q2.xlsx", sheet("NEVADA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Nevada_1033_2023_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q2.xlsx", sheet("NEW HAMPSHIRE") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\NewHampshire_1033_2023_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q2.xlsx", sheet("NEW JERSEY") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\NewJersey_1033_2023_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q2.xlsx", sheet("NEW MEXICO") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\NewMexico_1033_2023_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q2.xlsx", sheet("NEW YORK") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\NewYork_1033_2023_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q2.xlsx", sheet("NORTH CAROLINA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\NorthCarolina_1033_2023_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q2.xlsx", sheet("NORTH DAKOTA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\NorthDakota_1033_2023_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q2.xlsx", sheet("NORTHERN MARIANA ISLANDS") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\NMIslands_1033_2023_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q2.xlsx", sheet("OHIO") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Ohio_1033_2023_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q2.xlsx", sheet("OKLAHOMA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Oklahoma_1033_2023_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q2.xlsx", sheet("OREGON") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Oregon_1033_2023_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q2.xlsx", sheet("PENNSYLVANIA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Pennsylvania_1033_2023_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q2.xlsx", sheet("PUERTO RICO") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\PRico_1033_2023_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q2.xlsx", sheet("RHODE ISLAND") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\RhodeIsland_1033_2023_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q2.xlsx", sheet("SOUTH CAROLINA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\SouthCarolina_1033_2023_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q2.xlsx", sheet("SOUTH DAKOTA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\SouthDakota_1033_2023_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q2.xlsx", sheet("TENNESSEE") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Tennessee_1033_2023_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q2.xlsx", sheet("TEXAS") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Texas_1033_2023_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q2.xlsx", sheet("UTAH") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Utah_1033_2023_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q2.xlsx", sheet("VERMONT") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Vermont_1033_2023_Q2.dta", replace
clear
**NOTE VIRGIN ISLANDS OF THE US - "VIRIGN ISLANDS"
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q2.xlsx", sheet("VIRGIN ISLANDS OF THE U.S.") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\VIUS_1033_2023_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q2.xlsx", sheet("VIRGINIA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Virginia_1033_2023_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q2.xlsx", sheet("WASHINGTON") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Washington_1033_2023_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q2.xlsx", sheet("WEST VIRGINIA") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\WestVirginia_1033_2023_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q2.xlsx", sheet("WISCONSIN") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Wisconsin_1033_2023_Q2.dta", replace
clear
import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q2.xlsx", sheet("WYOMING") firstrow
save "C:\NAMED_DIRECTORY\1033_Data_States\Wyoming_1033_2023_Q2.dta", replace
clear

**APPEND STATE DATASETS TOGETHER
use "C:\NAMED_DIRECTORY\1033_Data_States\Alabama_1033_2023_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Alaska_1033_2023_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Arizona_1033_2023_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Arkansas_1033_2023_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\California_1033_2023_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Colorado_1033_2023_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Connecticut_1033_2023_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Delaware_1033_2023_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Florida_1033_2023_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Georgia_1033_2023_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Guam_1033_2023_Q2.dta"
*append using "C:\NAMED_DIRECTORY\1033_Data_States\Hawaii_1033_2023_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Idaho_1033_2023_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Illinois_1033_2023_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Indiana_1033_2023_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Iowa_1033_2023_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Kansas_1033_2023_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Kentucky_1033_2023_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Louisiana_1033_2023_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Maine_1033_2023_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Maryland_1033_2023_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Massachusetts_1033_2023_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Michigan_1033_2023_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Minnesota_1033_2023_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Mississippi_1033_2023_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Missouri_1033_2023_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Montana_1033_2023_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Nebraska_1033_2023_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Nevada_1033_2023_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\NewHampshire_1033_2023_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\NewJersey_1033_2023_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\NewMexico_1033_2023_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\NewYork_1033_2023_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\NorthCarolina_1033_2023_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\NorthDakota_1033_2023_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\NMIslands_1033_2023_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Ohio_1033_2023_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Oklahoma_1033_2023_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Oregon_1033_2023_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Pennsylvania_1033_2023_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\PRico_1033_2023_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\RhodeIsland_1033_2023_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\SouthCarolina_1033_2023_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\SouthDakota_1033_2023_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Tennessee_1033_2023_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Texas_1033_2023_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Utah_1033_2023_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Vermont_1033_2023_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Virginia_1033_2023_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\VIUS_1033_2023_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Washington_1033_2023_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\WestVirginia_1033_2023_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Wisconsin_1033_2023_Q2.dta"
append using "C:\NAMED_DIRECTORY\1033_Data_States\Wyoming_1033_2023_Q2.dta"

**SAVE 2023 QUARTER 2 
save "C:\NAMED_DIRECTORY\1033_StateData_2023_Q2.dta", replace
clear
use "C:\NAMED_DIRECTORY\1033_StateData_2023_Q2.dta"

**CREATE PANEL ID VARIABLES
order ShipDate, after(AgencyName)
sort State AgencyName ShipDate
egen AGENCY_ID = group(State AgencyName)
order AGENCY_ID, before(State)
label var AGENCY_ID "Agency Unique ID"

bysort AGENCY_ID ShipDate: gen SUBTIME_ID =_n
order SUBTIME_ID, after(AGENCY_ID)

gen TIME_ID = 0
order TIME_ID, before(SUBTIME_ID)
bysort AGENCY_ID SUBTIME_ID ShipDate: replace TIME_ID = _n
sort AGENCY_ID TIME_ID ShipDate SUBTIME_ID
label var TIME_ID "Agency Unique Shipment ID"

egen TIME_ID2 = tag(AGENCY_ID ShipDate)
order TIME_ID2, after(TIME_ID)
replace TIME_ID2 = . if TIME_ID2 == 0

gen TIME_ID3 = .
by AGENCY_ID: replace TIME_ID3 = sum(TIME_ID2)
order TIME_ID3, after(TIME_ID2)

drop TIME_ID TIME_ID2
gen TIME_ID = TIME_ID3
order TIME_ID, after(AGENCY_ID)
drop TIME_ID3

**SUM SAME ITEM QUANTITIES
egen SHIP_COUNT = sum(Quantity), by(AGENCY_ID TIME_ID)
order SHIP_COUNT, after(Quantity)

egen ITEM_COUNT = sum(Quantity), by(AGENCY_ID TIME_ID ItemName)
order ITEM_COUNT, after(Quantity)

**SUM ACQUISITION VALUES
egen ITEM_VALUE = sum(AcquisitionValue), by(AGENCY_ID TIME_ID ItemName)
order ITEM_VALUE, after(AcquisitionValue)

egen SHIP_VALUE = sum(ITEM_VALUE), by(AGENCY_ID TIME_ID)
order SHIP_VALUE, after(ITEM_VALUE)

**DROP ADDITIONALS AND DUPLICATES
**CAN MERGE BACK IN SOURCE QUARTERS LATER
drop Quantity NSN SUBTIME_ID UI AcquisitionValue StationType
duplicates drop 
gen QTR = "2023-2"
order QTR, after(TIME_ID)

**GEN ITEM ID
sort AGENCY_ID TIME_ID ItemName QTR
by AGENCY_ID TIME_ID ItemName: gen ITEM_ID = _n
order ITEM_ID, after(TIME_ID)
drop if AGENCY_ID == .

**LABEL VARS
rename *, upper
label var SHIPDATE "Date Items Shipped"
label var TIME_ID "Agency Shipment Unique ID"
label var ITEM_ID "Agency Shipment Item Unique ID"
label var QTR "1033 Quarter Identifier"
label var AGENCYNAME "Agency Name"
label var STATE "Agency Associated State"
label var ITEMNAME "1033 Item Identifier"
label var ITEM_COUNT "1033 Unique Item Count per Shipment"
label var SHIP_COUNT "1033 Total Item Count per Shipment"
label var ITEM_VALUE "1033 Unique Item Value Total per Shipment"
label var SHIP_VALUE "1033 Total Item Value per Shipment"
label var DEMILCODE "1033 Demilitarization Code"
label var DEMILIC "1033 Integrity Code"

**SAVE 2023 QUARTER 2 
save "C:\NAMED_DIRECTORY\1033_StateData_2023_Q2.dta", replace
clear

**NOTE
**THIS IS AN EXAMPLE OF HOW FUTURE 1033 QUARTERLY RELEASES CAN BE ADDED IN TO THE REPLICATION SCRIPT
**FUTURE RELEASES MADE AVAILABLE ON THE DLA WEBPAGE CAN BE PREPPED FOR THE DATABASE WITH THE SAME COMMANDS USED ABOVE
**REMOVING THE ** WILL ENABLE THE SCRIPT (THIS CAN BE DONE WITH EDIT--> FIND--> REPLACE--> - REPLACE * WITH BLANK FOR REMOVAL

********************************************************************************
**2023 QUARTER 3
********************************************************************************
**WEBPAGE
**NOTE - UPDATED WEBPAGE LINK HERE
**EXCEL LINK
*NOTE - UPDATED EXCEL DOWNLOAD LINK HERE

**MUST SAVE LINK SEPARATELY DUE TO EXCEL FORMAT WITH SHEETS (STATE SHEETS)
**DEVELOP LONGITUDINAL PANEL 1033 BY STATE/AGENCY
**NOTE ALL CAPS STATE NAMES - EXCEL PAGES
*import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q3.xlsx", sheet("ALABAMA") firstrow
*save "C:\NAMED_DIRECTORY\1033_Data_States\Alabama_1033_2023_Q3.dta", replace
*clear
*import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q3.xlsx", sheet("ALASKA") firstrow
*save "C:\NAMED_DIRECTORY\1033_Data_States\Alaska_1033_2023_Q3.dta", replace
*clear
*import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q3.xlsx", sheet("ARIZONA") firstrow
*save "C:\NAMED_DIRECTORY\1033_Data_States\Arizona_1033_2023_Q3.dta", replace
*clear
*import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q3.xlsx", sheet("ARKANSAS") firstrow
*save "C:\NAMED_DIRECTORY\1033_Data_States\Arkansas_1033_2023_Q3.dta", replace
*clear
*import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q3.xlsx", sheet("CALIFORNIA") firstrow
*save "C:\NAMED_DIRECTORY\1033_Data_States\California_1033_2023_Q3.dta", replace
*clear
*import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q3.xlsx", sheet("COLORADO") firstrow
*save "C:\NAMED_DIRECTORY\1033_Data_States\Colorado_1033_2023_Q3.dta", replace
*clear
*import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q3.xlsx", sheet("CONNECTICUT") firstrow
*save "C:\NAMED_DIRECTORY\1033_Data_States\Connecticut_1033_2023_Q3.dta", replace
*clear
*import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q3.xlsx", sheet("DELAWARE") firstrow
*save "C:\NAMED_DIRECTORY\1033_Data_States\Delaware_1033_2023_Q3.dta", replace
*clear
*import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q3.xlsx", sheet("FLORIDA") firstrow
*save "C:\NAMED_DIRECTORY\1033_Data_States\Florida_1033_2023_Q3.dta", replace
*clear
*import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q3.xlsx", sheet("GEORGIA") firstrow
*save "C:\NAMED_DIRECTORY\1033_Data_States\Georgia_1033_2023_Q3.dta", replace
*clear
*import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q3.xlsx", sheet("GUAM") firstrow
*save "C:\NAMED_DIRECTORY\1033_Data_States\Guam_1033_2023_Q3.dta", replace
*clear
*import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q3.xlsx", sheet("Hawaii") firstrow
*save "C:\NAMED_DIRECTORY\1033_Data_States\Hawaii_1033_2023_Q3.dta", replace
*clear
*import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q3.xlsx", sheet("IDAHO") firstrow
*save "C:\NAMED_DIRECTORY\1033_Data_States\Idaho_1033_2023_Q3.dta", replace
*clear
*import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q3.xlsx", sheet("ILLINOIS") firstrow
*save "C:\NAMED_DIRECTORY\1033_Data_States\Illinois_1033_2023_Q3.dta", replace
*clear
*import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q3.xlsx", sheet("INDIANA") firstrow
*save "C:\NAMED_DIRECTORY\1033_Data_States\Indiana_1033_2023_Q3.dta", replace
*clear
*import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q3.xlsx", sheet("IOWA") firstrow
*save "C:\NAMED_DIRECTORY\1033_Data_States\Iowa_1033_2023_Q3.dta", replace
*clear
*import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q3.xlsx", sheet("KANSAS") firstrow
*save "C:\NAMED_DIRECTORY\1033_Data_States\Kansas_1033_2023_Q3.dta", replace
*clear
*import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q3.xlsx", sheet("KENTUCKY") firstrow
*save "C:\NAMED_DIRECTORY\1033_Data_States\Kentucky_1033_2023_Q3.dta", replace
*clear
*import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q3.xlsx", sheet("LOUISIANA") firstrow
*save "C:\NAMED_DIRECTORY\1033_Data_States\Louisiana_1033_2023_Q3.dta", replace
*clear
*import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q3.xlsx", sheet("MAINE") firstrow
*save "C:\NAMED_DIRECTORY\1033_Data_States\Maine_1033_2023_Q3.dta", replace
*clear
*import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q3.xlsx", sheet("MARYLAND") firstrow
*save "C:\NAMED_DIRECTORY\1033_Data_States\Maryland_1033_2023_Q3.dta", replace
*clear
*import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q3.xlsx", sheet("MASSACHUSETTS") firstrow
*save "C:\NAMED_DIRECTORY\1033_Data_States\Massachusetts_1033_2023_Q3.dta", replace
*clear
*import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q3.xlsx", sheet("MICHIGAN") firstrow
*save "C:\NAMED_DIRECTORY\1033_Data_States\Michigan_1033_2023_Q3.dta", replace
*clear
*import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q3.xlsx", sheet("MINNESOTA") firstrow
*save "C:\NAMED_DIRECTORY\1033_Data_States\Minnesota_1033_2023_Q3.dta", replace
*clear
*import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q3.xlsx", sheet("MISSISSIPPI") firstrow
*save "C:\NAMED_DIRECTORY\1033_Data_States\Mississippi_1033_2023_Q3.dta", replace
*clear
*import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q3.xlsx", sheet("MISSOURI") firstrow
*save "C:\NAMED_DIRECTORY\1033_Data_States\Missouri_1033_2023_Q3.dta", replace
*clear
*import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q3.xlsx", sheet("MONTANA") firstrow
*save "C:\NAMED_DIRECTORY\1033_Data_States\Montana_1033_2023_Q3.dta", replace
*clear
*import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q3.xlsx", sheet("NEBRASKA") firstrow
*save "C:\NAMED_DIRECTORY\1033_Data_States\Nebraska_1033_2023_Q3.dta", replace
*clear
*import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q3.xlsx", sheet("NEVADA") firstrow
*save "C:\NAMED_DIRECTORY\1033_Data_States\Nevada_1033_2023_Q3.dta", replace
*clear
*import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q3.xlsx", sheet("NEW HAMPSHIRE") firstrow
*save "C:\NAMED_DIRECTORY\1033_Data_States\NewHampshire_1033_2023_Q3.dta", replace
*clear
*import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q3.xlsx", sheet("NEW JERSEY") firstrow
*save "C:\NAMED_DIRECTORY\1033_Data_States\NewJersey_1033_2023_Q3.dta", replace
*clear
*import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q3.xlsx", sheet("NEW MEXICO") firstrow
*save "C:\NAMED_DIRECTORY\1033_Data_States\NewMexico_1033_2023_Q3.dta", replace
*clear
*import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q3.xlsx", sheet("NEW YORK") firstrow
*save "C:\NAMED_DIRECTORY\1033_Data_States\NewYork_1033_2023_Q3.dta", replace
*clear
*import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q3.xlsx", sheet("NORTH CAROLINA") firstrow
*save "C:\NAMED_DIRECTORY\1033_Data_States\NorthCarolina_1033_2023_Q3.dta", replace
*clear
*import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q3.xlsx", sheet("NORTH DAKOTA") firstrow
*save "C:\NAMED_DIRECTORY\1033_Data_States\NorthDakota_1033_2023_Q3.dta", replace
*clear
*import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q3.xlsx", sheet("NORTHERN MARIANA ISLANDS") firstrow
*save "C:\NAMED_DIRECTORY\1033_Data_States\NMIslands_1033_2023_Q3.dta", replace
*clear
*import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q3.xlsx", sheet("OHIO") firstrow
*save "C:\NAMED_DIRECTORY\1033_Data_States\Ohio_1033_2023_Q3.dta", replace
*clear
*import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q3.xlsx", sheet("OKLAHOMA") firstrow
*save "C:\NAMED_DIRECTORY\1033_Data_States\Oklahoma_1033_2023_Q3.dta", replace
*clear
*import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q3.xlsx", sheet("OREGON") firstrow
*save "C:\NAMED_DIRECTORY\1033_Data_States\Oregon_1033_2023_Q3.dta", replace
*clear
*import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q3.xlsx", sheet("PENNSYLVANIA") firstrow
*save "C:\NAMED_DIRECTORY\1033_Data_States\Pennsylvania_1033_2023_Q3.dta", replace
*clear
*import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q3.xlsx", sheet("PUERTO RICO") firstrow
*save "C:\NAMED_DIRECTORY\1033_Data_States\PRico_1033_2023_Q3.dta", replace
*clear
*import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q3.xlsx", sheet("RHODE ISLAND") firstrow
*save "C:\NAMED_DIRECTORY\1033_Data_States\RhodeIsland_1033_2023_Q3.dta", replace
*clear
*import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q3.xlsx", sheet("SOUTH CAROLINA") firstrow
*save "C:\NAMED_DIRECTORY\1033_Data_States\SouthCarolina_1033_2023_Q3.dta", replace
*clear
*import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q3.xlsx", sheet("SOUTH DAKOTA") firstrow
*save "C:\NAMED_DIRECTORY\1033_Data_States\SouthDakota_1033_2023_Q3.dta", replace
*clear
*import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q3.xlsx", sheet("TENNESSEE") firstrow
*save "C:\NAMED_DIRECTORY\1033_Data_States\Tennessee_1033_2023_Q3.dta", replace
*clear
*import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q3.xlsx", sheet("TEXAS") firstrow
*save "C:\NAMED_DIRECTORY\1033_Data_States\Texas_1033_2023_Q3.dta", replace
*clear
*import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q3.xlsx", sheet("UTAH") firstrow
*save "C:\NAMED_DIRECTORY\1033_Data_States\Utah_1033_2023_Q3.dta", replace
*clear
*import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q3.xlsx", sheet("VERMONT") firstrow
*save "C:\NAMED_DIRECTORY\1033_Data_States\Vermont_1033_2023_Q3.dta", replace
*clear
**NOTE VIRGIN ISLANDS OF THE US - "VIRIGN ISLANDS"
*import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q3.xlsx", sheet("VIRGIN ISLANDS OF THE U.S.") firstrow
*save "C:\NAMED_DIRECTORY\1033_Data_States\VIUS_1033_2023_Q3.dta", replace
*clear
*import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q3.xlsx", sheet("VIRGINIA") firstrow
*save "C:\NAMED_DIRECTORY\1033_Data_States\Virginia_1033_2023_Q3.dta", replace
*clear
*import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q3.xlsx", sheet("WASHINGTON") firstrow
*save "C:\NAMED_DIRECTORY\1033_Data_States\Washington_1033_2023_Q3.dta", replace
*clear
*import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q3.xlsx", sheet("WEST VIRGINIA") firstrow
*save "C:\NAMED_DIRECTORY\1033_Data_States\WestVirginia_1033_2023_Q3.dta", replace
*clear
*import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q3.xlsx", sheet("WISCONSIN") firstrow
*save "C:\NAMED_DIRECTORY\1033_Data_States\Wisconsin_1033_2023_Q3.dta", replace
*clear
*import excel "C:\NAMED_DIRECTORY\AllStatesTerritoriesFY23Q3.xlsx", sheet("WYOMING") firstrow
*save "C:\NAMED_DIRECTORY\1033_Data_States\Wyoming_1033_2023_Q3.dta", replace
clear

**APPEND STATE DATASETS TOGETHER
*use "C:\NAMED_DIRECTORY\1033_Data_States\Alabama_1033_2023_Q3.dta"
*append using "C:\NAMED_DIRECTORY\1033_Data_States\Alaska_1033_2023_Q3.dta"
*append using "C:\NAMED_DIRECTORY\1033_Data_States\Arizona_1033_2023_Q3.dta"
*append using "C:\NAMED_DIRECTORY\1033_Data_States\Arkansas_1033_2023_Q3.dta"
*append using "C:\NAMED_DIRECTORY\1033_Data_States\California_1033_2023_Q3.dta"
*append using "C:\NAMED_DIRECTORY\1033_Data_States\Colorado_1033_2023_Q3.dta"
*append using "C:\NAMED_DIRECTORY\1033_Data_States\Connecticut_1033_2023_Q3.dta"
*append using "C:\NAMED_DIRECTORY\1033_Data_States\Delaware_1033_2023_Q3.dta"
*append using "C:\NAMED_DIRECTORY\1033_Data_States\Florida_1033_2023_Q3.dta"
*append using "C:\NAMED_DIRECTORY\1033_Data_States\Georgia_1033_2023_Q3.dta"
*append using "C:\NAMED_DIRECTORY\1033_Data_States\Guam_1033_2023_Q3.dta"
*append using "C:\NAMED_DIRECTORY\1033_Data_States\Hawaii_1033_2023_Q3.dta"
*append using "C:\NAMED_DIRECTORY\1033_Data_States\Idaho_1033_2023_Q3.dta"
*append using "C:\NAMED_DIRECTORY\1033_Data_States\Illinois_1033_2023_Q3.dta"
*append using "C:\NAMED_DIRECTORY\1033_Data_States\Indiana_1033_2023_Q3.dta"
*append using "C:\NAMED_DIRECTORY\1033_Data_States\Iowa_1033_2023_Q3.dta"
*append using "C:\NAMED_DIRECTORY\1033_Data_States\Kansas_1033_2023_Q3.dta"
*append using "C:\NAMED_DIRECTORY\1033_Data_States\Kentucky_1033_2023_Q3.dta"
*append using "C:\NAMED_DIRECTORY\1033_Data_States\Louisiana_1033_2023_Q3.dta"
*append using "C:\NAMED_DIRECTORY\1033_Data_States\Maine_1033_2023_Q3.dta"
*append using "C:\NAMED_DIRECTORY\1033_Data_States\Maryland_1033_2023_Q3.dta"
*append using "C:\NAMED_DIRECTORY\1033_Data_States\Massachusetts_1033_2023_Q3.dta"
*append using "C:\NAMED_DIRECTORY\1033_Data_States\Michigan_1033_2023_Q3.dta"
*append using "C:\NAMED_DIRECTORY\1033_Data_States\Minnesota_1033_2023_Q3.dta"
*append using "C:\NAMED_DIRECTORY\1033_Data_States\Mississippi_1033_2023_Q3.dta"
*append using "C:\NAMED_DIRECTORY\1033_Data_States\Missouri_1033_2023_Q3.dta"
*append using "C:\NAMED_DIRECTORY\1033_Data_States\Montana_1033_2023_Q3.dta"
*append using "C:\NAMED_DIRECTORY\1033_Data_States\Nebraska_1033_2023_Q3.dta"
*append using "C:\NAMED_DIRECTORY\1033_Data_States\Nevada_1033_2023_Q3.dta"
*append using "C:\NAMED_DIRECTORY\1033_Data_States\NewHampshire_1033_2023_Q3.dta"
*append using "C:\NAMED_DIRECTORY\1033_Data_States\NewJersey_1033_2023_Q3.dta"
*append using "C:\NAMED_DIRECTORY\1033_Data_States\NewMexico_1033_2023_Q3.dta"
*append using "C:\NAMED_DIRECTORY\1033_Data_States\NewYork_1033_2023_Q3.dta"
*append using "C:\NAMED_DIRECTORY\1033_Data_States\NorthCarolina_1033_2023_Q3.dta"
*append using "C:\NAMED_DIRECTORY\1033_Data_States\NorthDakota_1033_2023_Q3.dta"
*append using "C:\NAMED_DIRECTORY\1033_Data_States\NMIslands_1033_2023_Q3.dta"
*append using "C:\NAMED_DIRECTORY\1033_Data_States\Ohio_1033_2023_Q3.dta"
*append using "C:\NAMED_DIRECTORY\1033_Data_States\Oklahoma_1033_2023_Q3.dta"
*append using "C:\NAMED_DIRECTORY\1033_Data_States\Oregon_1033_2023_Q3.dta"
*append using "C:\NAMED_DIRECTORY\1033_Data_States\Pennsylvania_1033_2023_Q3.dta"
*append using "C:\NAMED_DIRECTORY\1033_Data_States\PRico_1033_2023_Q3.dta"
*append using "C:\NAMED_DIRECTORY\1033_Data_States\RhodeIsland_1033_2023_Q3.dta"
*append using "C:\NAMED_DIRECTORY\1033_Data_States\SouthCarolina_1033_2023_Q3.dta"
*append using "C:\NAMED_DIRECTORY\1033_Data_States\SouthDakota_1033_2023_Q3.dta"
*append using "C:\NAMED_DIRECTORY\1033_Data_States\Tennessee_1033_2023_Q3.dta"
*append using "C:\NAMED_DIRECTORY\1033_Data_States\Texas_1033_2023_Q3.dta"
*append using "C:\NAMED_DIRECTORY\1033_Data_States\Utah_1033_2023_Q3.dta"
*append using "C:\NAMED_DIRECTORY\1033_Data_States\Vermont_1033_2023_Q3.dta"
*append using "C:\NAMED_DIRECTORY\1033_Data_States\Virginia_1033_2023_Q3.dta"
*append using "C:\NAMED_DIRECTORY\1033_Data_States\VIUS_1033_2023_Q3.dta"
*append using "C:\NAMED_DIRECTORY\1033_Data_States\Washington_1033_2023_Q3.dta"
*append using "C:\NAMED_DIRECTORY\1033_Data_States\WestVirginia_1033_2023_Q3.dta"
*append using "C:\NAMED_DIRECTORY\1033_Data_States\Wisconsin_1033_2023_Q3.dta"
*append using "C:\NAMED_DIRECTORY\1033_Data_States\Wyoming_1033_2023_Q3.dta"

**SAVE 2023 QUARTER 3 
*save "C:\NAMED_DIRECTORY\1033_StateData_2023_Q3.dta", replace
*clear
*use "C:\NAMED_DIRECTORY\1033_StateData_2023_Q3.dta"

**CREATE PANEL ID VARIABLES
*order ShipDate, after(AgencyName)
*sort State AgencyName ShipDate
*egen AGENCY_ID = group(State AgencyName)
*order AGENCY_ID, before(State)
*label var AGENCY_ID "Agency Unique ID"

*bysort AGENCY_ID ShipDate: gen SUBTIME_ID =_n
*order SUBTIME_ID, after(AGENCY_ID)

*gen TIME_ID = 0
*order TIME_ID, before(SUBTIME_ID)
*bysort AGENCY_ID SUBTIME_ID ShipDate: replace TIME_ID = _n
*sort AGENCY_ID TIME_ID ShipDate SUBTIME_ID
*label var TIME_ID "Agency Unique Shipment ID"

*egen TIME_ID2 = tag(AGENCY_ID ShipDate)
*order TIME_ID2, after(TIME_ID)
*replace TIME_ID2 = . if TIME_ID2 == 0

*gen TIME_ID3 = .
*by AGENCY_ID: replace TIME_ID3 = sum(TIME_ID2)
*order TIME_ID3, after(TIME_ID2)

*drop TIME_ID TIME_ID2
*gen TIME_ID = TIME_ID3
*order TIME_ID, after(AGENCY_ID)
*drop TIME_ID3

**SUM SAME ITEM QUANTITIES
*egen SHIP_COUNT = sum(Quantity), by(AGENCY_ID TIME_ID)
*order SHIP_COUNT, after(Quantity)

*egen ITEM_COUNT = sum(Quantity), by(AGENCY_ID TIME_ID ItemName)
*order ITEM_COUNT, after(Quantity)

**SUM ACQUISITION VALUES
*egen ITEM_VALUE = sum(AcquisitionValue), by(AGENCY_ID TIME_ID ItemName)
*order ITEM_VALUE, after(AcquisitionValue)

*egen SHIP_VALUE = sum(ITEM_VALUE), by(AGENCY_ID TIME_ID)
*order SHIP_VALUE, after(ITEM_VALUE)

**DROP ADDITIONALS AND DUPLICATES
**CAN MERGE BACK IN SOURCE QUARTERS LATER
*drop Quantity NSN SUBTIME_ID UI AcquisitionValue StationType
*duplicates drop 
*gen QTR = "2023-3"
*order QTR, after(TIME_ID)

**GEN ITEM ID
*sort AGENCY_ID TIME_ID ItemName QTR
*by AGENCY_ID TIME_ID ItemName: gen ITEM_ID = _n
*order ITEM_ID, after(TIME_ID)
*drop if AGENCY_ID == .

**LABEL VARS
*rename *, upper
*label var SHIPDATE "Date Items Shipped"
*label var TIME_ID "Agency Shipment Unique ID"
*label var ITEM_ID "Agency Shipment Item Unique ID"
*label var QTR "1033 Quarter Identifier"
*label var AGENCYNAME "Agency Name"
*label var STATE "Agency Associated State"
*label var ITEMNAME "1033 Item Identifier"
*label var ITEM_COUNT "1033 Unique Item Count per Shipment"
*label var SHIP_COUNT "1033 Total Item Count per Shipment"
*label var ITEM_VALUE "1033 Unique Item Value Total per Shipment"
*label var SHIP_VALUE "1033 Total Item Value per Shipment"
*label var DEMILCODE "1033 Demilitarization Code"
*label var DEMILIC "1033 Integrity Code"

**SAVE 2023 QUARTER 3
*save "C:\NAMED_DIRECTORY\1033_StateData_2023_Q3.dta", replace
*clear


********************************************************************************
**APPEND 1033 QUARTERLY DATASETS TOGETHER
********************************************************************************

**NOTE
**EACH FULL STATE QUARTERLY DATABASE CAN NOW BE APPENDED INTO ONE LONGITUDINAL DATABASE OF ALL AVAILABLE QUARTERS

**LOAD PREPPED 2014-2020 QUARTERS
use "C:\NAMED_DIRECTORY\LongPanel1033_2014_2020.dta"

**FIX VARIABLE NAMING CONVENTIONS FOR APPEND
**FIX DATE
gen double SHIPDATE2 = clock(SHIPDATE, "YMDhms")
format %tc SHIPDATE2
drop SHIPDATE 
order SHIPDATE2
rename SHIPDATE2 SHIPDATE
label var SHIPDATE "Date Items Shipped"

**APPEND EACH INDIVIDUAL QUARTER AND SORT DATA BY AGENCY AND SHIPMENT TIME (QUARTER)
**APPEND 2020 Q2
append using "C:\NAMED_DIRECTORY\1033_StateData_2020_Q2.dta"
sort AGENCY_ID SHIPDATE QTR
**APPEND 2020 Q4
append using "C:\NAMED_DIRECTORY\1033_StateData_2020_Q4.dta"
sort AGENCY_ID SHIPDATE QTR
**APPEND 2021 Q2
append using "C:\NAMED_DIRECTORY\1033_StateData_2021_Q2.dta"
sort AGENCY_ID SHIPDATE QTR
**APPEND 2021 Q3
append using "C:\NAMED_DIRECTORY\1033_StateData_2021_Q3.dta"
sort AGENCY_ID SHIPDATE QTR
**APPEND 2022 Q1
append using "C:\NAMED_DIRECTORY\1033_StateData_2022_Q1.dta"
sort AGENCY_ID SHIPDATE QTR
**APPEND 2022 Q2
append using "C:\NAMED_DIRECTORY\1033_StateData_2022_Q2.dta"
sort AGENCY_ID SHIPDATE QTR
**APPEND 2022 Q4
append using "C:\NAMED_DIRECTORY\1033_StateData_2022_Q4.dta"
sort AGENCY_ID SHIPDATE QTR
**APPEND 2023 Q1
append using "C:\NAMED_DIRECTORY\1033_StateData_2023_Q1.dta"
sort AGENCY_ID SHIPDATE QTR
**APPEND 2023 Q2
append using "C:\NAMED_DIRECTORY\1033_StateData_2023_Q2.dta"
sort AGENCY_ID SHIPDATE ITEMNAME QTR

**SAVE QUARTERLY DATA MASTER FILE
save "C:\NAMED_DIRECTORY\1033_StateData_2014_2023.dta"
clear

**DEVELOP LONGITUDINAL IDs
**DROP ORIGINAL TIME_ID
use "C:\NAMED_DIRECTORY\1033_StateData_2014_2023.dta"
drop TIME_ID

bysort AGENCY_ID: gen AGTIME_ID = .
by AGENCY_ID: replace AGTIME_ID = group(SHIP_VALUE)
order AGTIME_ID, after(AGENCY_ID)
drop AGTIME_ID

**THIS CREATES LONGITUDINAL TIME SEQUENCED IDENTIFIERS FOR SHIPMENTS BY AGENCY
**THIS MUST BE DONE IN BLOCKS BASED ON COMPUTER PROCESSING POWER 
**NOTE: LOOPS CRASH - MORE EFFECTIVE TO INDIVIDUALLY CREATE VARIABLES THROUGH EGEN AND GROUP
**GENERATE NEW LONGITUDINAL AGENCY AND SHIPMENT ID
**VARIABLE BLOCK 1-500
egen AGTIME_1	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1
egen AGTIME_2	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2
egen AGTIME_3	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3
egen AGTIME_4	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4
egen AGTIME_5	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5
egen AGTIME_6	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6
egen AGTIME_7	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7
egen AGTIME_8	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8
egen AGTIME_9	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9
egen AGTIME_10	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 10
egen AGTIME_11	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 11
egen AGTIME_12	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 12
egen AGTIME_13	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 13
egen AGTIME_14	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 14
egen AGTIME_15	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 15
egen AGTIME_16	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 16
egen AGTIME_17	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 17
egen AGTIME_18	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 18
egen AGTIME_19	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 19
egen AGTIME_20	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 20
egen AGTIME_21	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 21
egen AGTIME_22	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 22
egen AGTIME_23	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 23
egen AGTIME_24	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 24
egen AGTIME_25	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 25
egen AGTIME_26	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 26
egen AGTIME_27	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 27
egen AGTIME_28	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 28
egen AGTIME_29	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 29
egen AGTIME_30	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 30
egen AGTIME_31	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 31
egen AGTIME_32	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 32
egen AGTIME_33	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 33
egen AGTIME_34	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 34
egen AGTIME_35	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 35
egen AGTIME_36	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 36
egen AGTIME_37	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 37
egen AGTIME_38	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 38
egen AGTIME_39	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 39
egen AGTIME_40	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 40
egen AGTIME_41	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 41
egen AGTIME_42	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 42
egen AGTIME_43	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 43
egen AGTIME_44	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 44
egen AGTIME_45	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 45
egen AGTIME_46	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 46
egen AGTIME_47	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 47
egen AGTIME_48	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 48
egen AGTIME_49	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 49
egen AGTIME_50	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 50
egen AGTIME_51	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 51
egen AGTIME_52	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 52
egen AGTIME_53	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 53
egen AGTIME_54	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 54
egen AGTIME_55	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 55
egen AGTIME_56	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 56
egen AGTIME_57	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 57
egen AGTIME_58	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 58
egen AGTIME_59	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 59
egen AGTIME_60	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 60
egen AGTIME_61	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 61
egen AGTIME_62	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 62
egen AGTIME_63	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 63
egen AGTIME_64	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 64
egen AGTIME_65	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 65
egen AGTIME_66	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 66
egen AGTIME_67	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 67
egen AGTIME_68	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 68
egen AGTIME_69	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 69
egen AGTIME_70	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 70
egen AGTIME_71	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 71
egen AGTIME_72	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 72
egen AGTIME_73	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 73
egen AGTIME_74	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 74
egen AGTIME_75	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 75
egen AGTIME_76	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 76
egen AGTIME_77	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 77
egen AGTIME_78	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 78
egen AGTIME_79	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 79
egen AGTIME_80	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 80
egen AGTIME_81	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 81
egen AGTIME_82	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 82
egen AGTIME_83	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 83
egen AGTIME_84	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 84
egen AGTIME_85	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 85
egen AGTIME_86	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 86
egen AGTIME_87	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 87
egen AGTIME_88	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 88
egen AGTIME_89	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 89
egen AGTIME_90	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 90
egen AGTIME_91	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 91
egen AGTIME_92	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 92
egen AGTIME_93	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 93
egen AGTIME_94	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 94
egen AGTIME_95	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 95
egen AGTIME_96	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 96
egen AGTIME_97	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 97
egen AGTIME_98	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 98
egen AGTIME_99	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 99
egen AGTIME_100	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 100
egen AGTIME_101	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 101
egen AGTIME_102	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 102
egen AGTIME_103	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 103
egen AGTIME_104	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 104
egen AGTIME_105	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 105
egen AGTIME_106	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 106
egen AGTIME_107	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 107
egen AGTIME_108	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 108
egen AGTIME_109	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 109
egen AGTIME_110	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 110
egen AGTIME_111	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 111
egen AGTIME_112	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 112
egen AGTIME_113	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 113
egen AGTIME_114	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 114
egen AGTIME_115	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 115
egen AGTIME_116	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 116
egen AGTIME_117	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 117
egen AGTIME_118	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 118
egen AGTIME_119	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 119
egen AGTIME_120	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 120
egen AGTIME_121	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 121
egen AGTIME_122	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 122
egen AGTIME_123	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 123
egen AGTIME_124	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 124
egen AGTIME_125	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 125
egen AGTIME_126	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 126
egen AGTIME_127	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 127
egen AGTIME_128	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 128
egen AGTIME_129	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 129
egen AGTIME_130	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 130
egen AGTIME_131	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 131
egen AGTIME_132	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 132
egen AGTIME_133	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 133
egen AGTIME_134	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 134
egen AGTIME_135	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 135
egen AGTIME_136	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 136
egen AGTIME_137	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 137
egen AGTIME_138	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 138
egen AGTIME_139	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 139
egen AGTIME_140	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 140
egen AGTIME_141	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 141
egen AGTIME_142	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 142
egen AGTIME_143	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 143
egen AGTIME_144	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 144
egen AGTIME_145	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 145
egen AGTIME_146	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 146
egen AGTIME_147	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 147
egen AGTIME_148	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 148
egen AGTIME_149	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 149
egen AGTIME_150	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 150
egen AGTIME_151	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 151
egen AGTIME_152	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 152
egen AGTIME_153	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 153
egen AGTIME_154	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 154
egen AGTIME_155	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 155
egen AGTIME_156	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 156
egen AGTIME_157	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 157
egen AGTIME_158	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 158
egen AGTIME_159	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 159
egen AGTIME_160	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 160
egen AGTIME_161	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 161
egen AGTIME_162	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 162
egen AGTIME_163	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 163
egen AGTIME_164	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 164
egen AGTIME_165	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 165
egen AGTIME_166	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 166
egen AGTIME_167	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 167
egen AGTIME_168	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 168
egen AGTIME_169	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 169
egen AGTIME_170	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 170
egen AGTIME_171	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 171
egen AGTIME_172	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 172
egen AGTIME_173	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 173
egen AGTIME_174	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 174
egen AGTIME_175	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 175
egen AGTIME_176	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 176
egen AGTIME_177	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 177
egen AGTIME_178	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 178
egen AGTIME_179	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 179
egen AGTIME_180	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 180
egen AGTIME_181	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 181
egen AGTIME_182	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 182
egen AGTIME_183	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 183
egen AGTIME_184	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 184
egen AGTIME_185	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 185
egen AGTIME_186	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 186
egen AGTIME_187	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 187
egen AGTIME_188	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 188
egen AGTIME_189	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 189
egen AGTIME_190	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 190
egen AGTIME_191	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 191
egen AGTIME_192	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 192
egen AGTIME_193	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 193
egen AGTIME_194	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 194
egen AGTIME_195	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 195
egen AGTIME_196	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 196
egen AGTIME_197	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 197
egen AGTIME_198	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 198
egen AGTIME_199	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 199
egen AGTIME_200	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 200
egen AGTIME_201	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 201
egen AGTIME_202	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 202
egen AGTIME_203	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 203
egen AGTIME_204	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 204
egen AGTIME_205	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 205
egen AGTIME_206	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 206
egen AGTIME_207	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 207
egen AGTIME_208	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 208
egen AGTIME_209	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 209
egen AGTIME_210	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 210
egen AGTIME_211	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 211
egen AGTIME_212	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 212
egen AGTIME_213	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 213
egen AGTIME_214	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 214
egen AGTIME_215	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 215
egen AGTIME_216	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 216
egen AGTIME_217	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 217
egen AGTIME_218	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 218
egen AGTIME_219	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 219
egen AGTIME_220	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 220
egen AGTIME_221	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 221
egen AGTIME_222	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 222
egen AGTIME_223	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 223
egen AGTIME_224	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 224
egen AGTIME_225	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 225
egen AGTIME_226	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 226
egen AGTIME_227	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 227
egen AGTIME_228	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 228
egen AGTIME_229	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 229
egen AGTIME_230	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 230
egen AGTIME_231	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 231
egen AGTIME_232	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 232
egen AGTIME_233	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 233
egen AGTIME_234	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 234
egen AGTIME_235	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 235
egen AGTIME_236	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 236
egen AGTIME_237	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 237
egen AGTIME_238	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 238
egen AGTIME_239	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 239
egen AGTIME_240	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 240
egen AGTIME_241	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 241
egen AGTIME_242	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 242
egen AGTIME_243	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 243
egen AGTIME_244	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 244
egen AGTIME_245	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 245
egen AGTIME_246	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 246
egen AGTIME_247	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 247
egen AGTIME_248	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 248
egen AGTIME_249	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 249
egen AGTIME_250	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 250
egen AGTIME_251	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 251
egen AGTIME_252	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 252
egen AGTIME_253	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 253
egen AGTIME_254	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 254
egen AGTIME_255	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 255
egen AGTIME_256	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 256
egen AGTIME_257	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 257
egen AGTIME_258	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 258
egen AGTIME_259	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 259
egen AGTIME_260	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 260
egen AGTIME_261	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 261
egen AGTIME_262	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 262
egen AGTIME_263	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 263
egen AGTIME_264	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 264
egen AGTIME_265	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 265
egen AGTIME_266	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 266
egen AGTIME_267	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 267
egen AGTIME_268	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 268
egen AGTIME_269	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 269
egen AGTIME_270	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 270
egen AGTIME_271	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 271
egen AGTIME_272	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 272
egen AGTIME_273	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 273
egen AGTIME_274	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 274
egen AGTIME_275	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 275
egen AGTIME_276	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 276
egen AGTIME_277	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 277
egen AGTIME_278	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 278
egen AGTIME_279	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 279
egen AGTIME_280	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 280
egen AGTIME_281	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 281
egen AGTIME_282	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 282
egen AGTIME_283	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 283
egen AGTIME_284	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 284
egen AGTIME_285	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 285
egen AGTIME_286	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 286
egen AGTIME_287	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 287
egen AGTIME_288	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 288
egen AGTIME_289	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 289
egen AGTIME_290	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 290
egen AGTIME_291	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 291
egen AGTIME_292	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 292
egen AGTIME_293	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 293
egen AGTIME_294	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 294
egen AGTIME_295	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 295
egen AGTIME_296	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 296
egen AGTIME_297	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 297
egen AGTIME_298	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 298
egen AGTIME_299	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 299
egen AGTIME_300	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 300
egen AGTIME_301	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 301
egen AGTIME_302	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 302
egen AGTIME_303	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 303
egen AGTIME_304	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 304
egen AGTIME_305	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 305
egen AGTIME_306	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 306
egen AGTIME_307	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 307
egen AGTIME_308	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 308
egen AGTIME_309	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 309
egen AGTIME_310	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 310
egen AGTIME_311	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 311
egen AGTIME_312	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 312
egen AGTIME_313	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 313
egen AGTIME_314	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 314
egen AGTIME_315	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 315
egen AGTIME_316	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 316
egen AGTIME_317	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 317
egen AGTIME_318	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 318
egen AGTIME_319	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 319
egen AGTIME_320	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 320
egen AGTIME_321	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 321
egen AGTIME_322	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 322
egen AGTIME_323	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 323
egen AGTIME_324	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 324
egen AGTIME_325	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 325
egen AGTIME_326	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 326
egen AGTIME_327	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 327
egen AGTIME_328	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 328
egen AGTIME_329	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 329
egen AGTIME_330	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 330
egen AGTIME_331	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 331
egen AGTIME_332	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 332
egen AGTIME_333	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 333
egen AGTIME_334	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 334
egen AGTIME_335	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 335
egen AGTIME_336	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 336
egen AGTIME_337	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 337
egen AGTIME_338	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 338
egen AGTIME_339	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 339
egen AGTIME_340	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 340
egen AGTIME_341	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 341
egen AGTIME_342	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 342
egen AGTIME_343	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 343
egen AGTIME_344	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 344
egen AGTIME_345	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 345
egen AGTIME_346	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 346
egen AGTIME_347	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 347
egen AGTIME_348	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 348
egen AGTIME_349	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 349
egen AGTIME_350	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 350
egen AGTIME_351	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 351
egen AGTIME_352	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 352
egen AGTIME_353	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 353
egen AGTIME_354	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 354
egen AGTIME_355	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 355
egen AGTIME_356	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 356
egen AGTIME_357	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 357
egen AGTIME_358	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 358
egen AGTIME_359	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 359
egen AGTIME_360	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 360
egen AGTIME_361	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 361
egen AGTIME_362	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 362
egen AGTIME_363	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 363
egen AGTIME_364	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 364
egen AGTIME_365	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 365
egen AGTIME_366	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 366
egen AGTIME_367	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 367
egen AGTIME_368	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 368
egen AGTIME_369	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 369
egen AGTIME_370	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 370
egen AGTIME_371	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 371
egen AGTIME_372	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 372
egen AGTIME_373	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 373
egen AGTIME_374	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 374
egen AGTIME_375	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 375
egen AGTIME_376	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 376
egen AGTIME_377	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 377
egen AGTIME_378	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 378
egen AGTIME_379	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 379
egen AGTIME_380	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 380
egen AGTIME_381	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 381
egen AGTIME_382	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 382
egen AGTIME_383	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 383
egen AGTIME_384	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 384
egen AGTIME_385	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 385
egen AGTIME_386	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 386
egen AGTIME_387	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 387
egen AGTIME_388	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 388
egen AGTIME_389	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 389
egen AGTIME_390	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 390
egen AGTIME_391	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 391
egen AGTIME_392	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 392
egen AGTIME_393	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 393
egen AGTIME_394	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 394
egen AGTIME_395	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 395
egen AGTIME_396	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 396
egen AGTIME_397	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 397
egen AGTIME_398	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 398
egen AGTIME_399	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 399
egen AGTIME_400	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 400
egen AGTIME_401	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 401
egen AGTIME_402	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 402
egen AGTIME_403	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 403
egen AGTIME_404	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 404
egen AGTIME_405	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 405
egen AGTIME_406	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 406
egen AGTIME_407	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 407
egen AGTIME_408	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 408
egen AGTIME_409	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 409
egen AGTIME_410	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 410
egen AGTIME_411	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 411
egen AGTIME_412	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 412
egen AGTIME_413	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 413
egen AGTIME_414	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 414
egen AGTIME_415	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 415
egen AGTIME_416	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 416
egen AGTIME_417	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 417
egen AGTIME_418	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 418
egen AGTIME_419	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 419
egen AGTIME_420	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 420
egen AGTIME_421	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 421
egen AGTIME_422	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 422
egen AGTIME_423	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 423
egen AGTIME_424	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 424
egen AGTIME_425	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 425
egen AGTIME_426	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 426
egen AGTIME_427	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 427
egen AGTIME_428	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 428
egen AGTIME_429	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 429
egen AGTIME_430	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 430
egen AGTIME_431	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 431
egen AGTIME_432	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 432
egen AGTIME_433	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 433
egen AGTIME_434	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 434
egen AGTIME_435	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 435
egen AGTIME_436	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 436
egen AGTIME_437	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 437
egen AGTIME_438	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 438
egen AGTIME_439	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 439
egen AGTIME_440	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 440
egen AGTIME_441	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 441
egen AGTIME_442	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 442
egen AGTIME_443	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 443
egen AGTIME_444	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 444
egen AGTIME_445	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 445
egen AGTIME_446	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 446
egen AGTIME_447	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 447
egen AGTIME_448	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 448
egen AGTIME_449	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 449
egen AGTIME_450	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 450
egen AGTIME_451	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 451
egen AGTIME_452	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 452
egen AGTIME_453	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 453
egen AGTIME_454	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 454
egen AGTIME_455	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 455
egen AGTIME_456	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 456
egen AGTIME_457	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 457
egen AGTIME_458	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 458
egen AGTIME_459	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 459
egen AGTIME_460	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 460
egen AGTIME_461	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 461
egen AGTIME_462	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 462
egen AGTIME_463	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 463
egen AGTIME_464	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 464
egen AGTIME_465	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 465
egen AGTIME_466	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 466
egen AGTIME_467	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 467
egen AGTIME_468	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 468
egen AGTIME_469	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 469
egen AGTIME_470	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 470
egen AGTIME_471	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 471
egen AGTIME_472	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 472
egen AGTIME_473	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 473
egen AGTIME_474	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 474
egen AGTIME_475	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 475
egen AGTIME_476	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 476
egen AGTIME_477	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 477
egen AGTIME_478	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 478
egen AGTIME_479	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 479
egen AGTIME_480	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 480
egen AGTIME_481	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 481
egen AGTIME_482	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 482
egen AGTIME_483	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 483
egen AGTIME_484	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 484
egen AGTIME_485	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 485
egen AGTIME_486	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 486
egen AGTIME_487	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 487
egen AGTIME_488	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 488
egen AGTIME_489	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 489
egen AGTIME_490	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 490
egen AGTIME_491	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 491
egen AGTIME_492	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 492
egen AGTIME_493	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 493
egen AGTIME_494	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 494
egen AGTIME_495	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 495
egen AGTIME_496	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 496
egen AGTIME_497	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 497
egen AGTIME_498	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 498
egen AGTIME_499	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 499
egen AGTIME_500	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 500

save "C:\NAMED_DIRECTORY\1033_StateQTRData_2014_2023.dta", replace
clear

**GENERATE FINAL AGGREGATED AGTIME VARIABLE
**REPLACE AND DROP AGTIME 1-500
use "C:\NAMED_DIRECTORY\1033_StateQTRData_2014_2023.dta"
gen AGTIME_ID = .
order AGTIME_ID, after(AGENCY_ID)
replace AGTIME_ID =	AGTIME_1	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_10	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_11	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_12	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_13	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_14	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_15	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_16	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_17	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_18	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_19	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_20	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_21	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_22	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_23	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_24	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_25	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_26	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_27	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_28	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_29	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_30	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_31	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_32	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_33	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_34	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_35	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_36	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_37	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_38	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_39	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_40	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_41	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_42	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_43	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_44	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_45	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_46	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_47	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_48	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_49	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_50	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_51	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_52	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_53	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_54	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_55	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_56	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_57	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_58	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_59	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_60	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_61	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_62	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_63	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_64	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_65	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_66	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_67	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_68	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_69	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_70	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_71	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_72	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_73	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_74	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_75	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_76	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_77	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_78	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_79	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_80	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_81	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_82	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_83	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_84	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_85	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_86	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_87	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_88	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_89	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_90	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_91	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_92	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_93	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_94	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_95	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_96	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_97	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_98	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_99	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_100	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_101	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_102	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_103	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_104	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_105	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_106	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_107	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_108	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_109	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_110	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_111	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_112	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_113	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_114	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_115	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_116	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_117	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_118	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_119	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_120	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_121	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_122	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_123	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_124	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_125	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_126	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_127	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_128	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_129	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_130	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_131	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_132	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_133	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_134	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_135	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_136	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_137	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_138	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_139	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_140	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_141	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_142	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_143	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_144	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_145	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_146	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_147	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_148	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_149	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_150	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_151	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_152	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_153	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_154	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_155	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_156	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_157	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_158	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_159	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_160	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_161	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_162	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_163	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_164	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_165	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_166	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_167	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_168	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_169	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_170	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_171	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_172	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_173	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_174	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_175	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_176	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_177	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_178	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_179	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_180	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_181	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_182	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_183	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_184	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_185	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_186	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_187	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_188	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_189	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_190	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_191	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_192	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_193	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_194	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_195	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_196	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_197	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_198	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_199	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_200	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_201	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_202	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_203	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_204	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_205	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_206	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_207	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_208	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_209	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_210	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_211	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_212	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_213	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_214	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_215	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_216	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_217	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_218	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_219	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_220	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_221	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_222	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_223	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_224	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_225	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_226	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_227	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_228	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_229	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_230	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_231	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_232	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_233	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_234	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_235	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_236	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_237	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_238	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_239	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_240	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_241	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_242	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_243	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_244	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_245	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_246	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_247	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_248	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_249	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_250	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_251	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_252	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_253	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_254	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_255	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_256	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_257	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_258	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_259	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_260	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_261	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_262	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_263	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_264	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_265	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_266	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_267	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_268	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_269	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_270	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_271	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_272	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_273	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_274	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_275	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_276	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_277	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_278	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_279	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_280	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_281	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_282	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_283	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_284	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_285	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_286	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_287	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_288	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_289	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_290	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_291	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_292	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_293	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_294	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_295	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_296	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_297	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_298	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_299	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_300	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_301	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_302	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_303	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_304	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_305	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_306	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_307	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_308	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_309	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_310	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_311	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_312	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_313	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_314	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_315	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_316	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_317	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_318	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_319	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_320	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_321	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_322	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_323	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_324	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_325	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_326	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_327	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_328	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_329	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_330	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_331	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_332	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_333	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_334	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_335	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_336	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_337	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_338	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_339	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_340	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_341	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_342	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_343	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_344	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_345	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_346	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_347	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_348	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_349	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_350	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_351	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_352	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_353	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_354	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_355	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_356	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_357	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_358	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_359	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_360	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_361	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_362	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_363	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_364	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_365	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_366	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_367	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_368	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_369	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_370	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_371	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_372	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_373	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_374	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_375	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_376	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_377	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_378	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_379	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_380	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_381	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_382	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_383	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_384	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_385	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_386	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_387	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_388	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_389	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_390	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_391	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_392	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_393	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_394	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_395	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_396	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_397	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_398	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_399	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_400	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_401	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_402	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_403	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_404	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_405	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_406	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_407	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_408	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_409	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_410	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_411	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_412	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_413	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_414	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_415	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_416	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_417	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_418	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_419	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_420	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_421	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_422	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_423	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_424	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_425	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_426	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_427	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_428	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_429	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_430	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_431	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_432	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_433	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_434	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_435	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_436	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_437	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_438	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_439	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_440	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_441	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_442	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_443	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_444	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_445	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_446	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_447	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_448	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_449	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_450	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_451	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_452	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_453	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_454	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_455	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_456	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_457	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_458	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_459	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_460	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_461	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_462	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_463	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_464	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_465	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_466	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_467	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_468	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_469	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_470	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_471	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_472	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_473	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_474	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_475	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_476	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_477	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_478	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_479	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_480	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_481	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_482	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_483	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_484	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_485	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_486	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_487	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_488	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_489	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_490	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_491	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_492	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_493	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_494	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_495	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_496	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_497	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_498	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_499	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_500	if AGTIME_ID == .

drop AGTIME_1-AGTIME_500

save "C:\NAMED_DIRECTORY\1033_StateQTRData_2014_2023.dta", replace
clear

**VARIABLE BLOCK 501-1000
use "C:\NAMED_DIRECTORY\1033_StateQTRData_2014_2023.dta"
egen AGTIME_501	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 501
egen AGTIME_502	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 502
egen AGTIME_503	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 503
egen AGTIME_504	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 504
egen AGTIME_505	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 505
egen AGTIME_506	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 506
egen AGTIME_507	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 507
egen AGTIME_508	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 508
egen AGTIME_509	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 509
egen AGTIME_510	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 510
egen AGTIME_511	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 511
egen AGTIME_512	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 512
egen AGTIME_513	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 513
egen AGTIME_514	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 514
egen AGTIME_515	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 515
egen AGTIME_516	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 516
egen AGTIME_517	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 517
egen AGTIME_518	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 518
egen AGTIME_519	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 519
egen AGTIME_520	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 520
egen AGTIME_521	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 521
egen AGTIME_522	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 522
egen AGTIME_523	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 523
egen AGTIME_524	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 524
egen AGTIME_525	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 525
egen AGTIME_526	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 526
egen AGTIME_527	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 527
egen AGTIME_528	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 528
egen AGTIME_529	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 529
egen AGTIME_530	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 530
egen AGTIME_531	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 531
egen AGTIME_532	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 532
egen AGTIME_533	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 533
egen AGTIME_534	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 534
egen AGTIME_535	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 535
egen AGTIME_536	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 536
egen AGTIME_537	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 537
egen AGTIME_538	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 538
egen AGTIME_539	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 539
egen AGTIME_540	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 540
egen AGTIME_541	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 541
egen AGTIME_542	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 542
egen AGTIME_543	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 543
egen AGTIME_544	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 544
egen AGTIME_545	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 545
egen AGTIME_546	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 546
egen AGTIME_547	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 547
egen AGTIME_548	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 548
egen AGTIME_549	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 549
egen AGTIME_550	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 550
egen AGTIME_551	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 551
egen AGTIME_552	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 552
egen AGTIME_553	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 553
egen AGTIME_554	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 554
egen AGTIME_555	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 555
egen AGTIME_556	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 556
egen AGTIME_557	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 557
egen AGTIME_558	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 558
egen AGTIME_559	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 559
egen AGTIME_560	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 560
egen AGTIME_561	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 561
egen AGTIME_562	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 562
egen AGTIME_563	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 563
egen AGTIME_564	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 564
egen AGTIME_565	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 565
egen AGTIME_566	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 566
egen AGTIME_567	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 567
egen AGTIME_568	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 568
egen AGTIME_569	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 569
egen AGTIME_570	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 570
egen AGTIME_571	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 571
egen AGTIME_572	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 572
egen AGTIME_573	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 573
egen AGTIME_574	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 574
egen AGTIME_575	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 575
egen AGTIME_576	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 576
egen AGTIME_577	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 577
egen AGTIME_578	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 578
egen AGTIME_579	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 579
egen AGTIME_580	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 580
egen AGTIME_581	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 581
egen AGTIME_582	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 582
egen AGTIME_583	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 583
egen AGTIME_584	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 584
egen AGTIME_585	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 585
egen AGTIME_586	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 586
egen AGTIME_587	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 587
egen AGTIME_588	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 588
egen AGTIME_589	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 589
egen AGTIME_590	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 590
egen AGTIME_591	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 591
egen AGTIME_592	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 592
egen AGTIME_593	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 593
egen AGTIME_594	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 594
egen AGTIME_595	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 595
egen AGTIME_596	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 596
egen AGTIME_597	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 597
egen AGTIME_598	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 598
egen AGTIME_599	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 599
egen AGTIME_600	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 600
egen AGTIME_601	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 601
egen AGTIME_602	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 602
egen AGTIME_603	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 603
egen AGTIME_604	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 604
egen AGTIME_605	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 605
egen AGTIME_606	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 606
egen AGTIME_607	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 607
egen AGTIME_608	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 608
egen AGTIME_609	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 609
egen AGTIME_610	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 610
egen AGTIME_611	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 611
egen AGTIME_612	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 612
egen AGTIME_613	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 613
egen AGTIME_614	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 614
egen AGTIME_615	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 615
egen AGTIME_616	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 616
egen AGTIME_617	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 617
egen AGTIME_618	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 618
egen AGTIME_619	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 619
egen AGTIME_620	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 620
egen AGTIME_621	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 621
egen AGTIME_622	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 622
egen AGTIME_623	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 623
egen AGTIME_624	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 624
egen AGTIME_625	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 625
egen AGTIME_626	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 626
egen AGTIME_627	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 627
egen AGTIME_628	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 628
egen AGTIME_629	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 629
egen AGTIME_630	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 630
egen AGTIME_631	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 631
egen AGTIME_632	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 632
egen AGTIME_633	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 633
egen AGTIME_634	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 634
egen AGTIME_635	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 635
egen AGTIME_636	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 636
egen AGTIME_637	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 637
egen AGTIME_638	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 638
egen AGTIME_639	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 639
egen AGTIME_640	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 640
egen AGTIME_641	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 641
egen AGTIME_642	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 642
egen AGTIME_643	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 643
egen AGTIME_644	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 644
egen AGTIME_645	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 645
egen AGTIME_646	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 646
egen AGTIME_647	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 647
egen AGTIME_648	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 648
egen AGTIME_649	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 649
egen AGTIME_650	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 650
egen AGTIME_651	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 651
egen AGTIME_652	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 652
egen AGTIME_653	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 653
egen AGTIME_654	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 654
egen AGTIME_655	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 655
egen AGTIME_656	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 656
egen AGTIME_657	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 657
egen AGTIME_658	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 658
egen AGTIME_659	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 659
egen AGTIME_660	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 660
egen AGTIME_661	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 661
egen AGTIME_662	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 662
egen AGTIME_663	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 663
egen AGTIME_664	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 664
egen AGTIME_665	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 665
egen AGTIME_666	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 666
egen AGTIME_667	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 667
egen AGTIME_668	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 668
egen AGTIME_669	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 669
egen AGTIME_670	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 670
egen AGTIME_671	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 671
egen AGTIME_672	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 672
egen AGTIME_673	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 673
egen AGTIME_674	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 674
egen AGTIME_675	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 675
egen AGTIME_676	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 676
egen AGTIME_677	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 677
egen AGTIME_678	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 678
egen AGTIME_679	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 679
egen AGTIME_680	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 680
egen AGTIME_681	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 681
egen AGTIME_682	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 682
egen AGTIME_683	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 683
egen AGTIME_684	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 684
egen AGTIME_685	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 685
egen AGTIME_686	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 686
egen AGTIME_687	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 687
egen AGTIME_688	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 688
egen AGTIME_689	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 689
egen AGTIME_690	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 690
egen AGTIME_691	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 691
egen AGTIME_692	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 692
egen AGTIME_693	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 693
egen AGTIME_694	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 694
egen AGTIME_695	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 695
egen AGTIME_696	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 696
egen AGTIME_697	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 697
egen AGTIME_698	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 698
egen AGTIME_699	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 699
egen AGTIME_700	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 700
egen AGTIME_701	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 701
egen AGTIME_702	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 702
egen AGTIME_703	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 703
egen AGTIME_704	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 704
egen AGTIME_705	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 705
egen AGTIME_706	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 706
egen AGTIME_707	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 707
egen AGTIME_708	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 708
egen AGTIME_709	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 709
egen AGTIME_710	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 710
egen AGTIME_711	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 711
egen AGTIME_712	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 712
egen AGTIME_713	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 713
egen AGTIME_714	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 714
egen AGTIME_715	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 715
egen AGTIME_716	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 716
egen AGTIME_717	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 717
egen AGTIME_718	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 718
egen AGTIME_719	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 719
egen AGTIME_720	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 720
egen AGTIME_721	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 721
egen AGTIME_722	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 722
egen AGTIME_723	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 723
egen AGTIME_724	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 724
egen AGTIME_725	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 725
egen AGTIME_726	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 726
egen AGTIME_727	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 727
egen AGTIME_728	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 728
egen AGTIME_729	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 729
egen AGTIME_730	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 730
egen AGTIME_731	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 731
egen AGTIME_732	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 732
egen AGTIME_733	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 733
egen AGTIME_734	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 734
egen AGTIME_735	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 735
egen AGTIME_736	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 736
egen AGTIME_737	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 737
egen AGTIME_738	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 738
egen AGTIME_739	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 739
egen AGTIME_740	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 740
egen AGTIME_741	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 741
egen AGTIME_742	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 742
egen AGTIME_743	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 743
egen AGTIME_744	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 744
egen AGTIME_745	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 745
egen AGTIME_746	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 746
egen AGTIME_747	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 747
egen AGTIME_748	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 748
egen AGTIME_749	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 749
egen AGTIME_750	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 750
egen AGTIME_751	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 751
egen AGTIME_752	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 752
egen AGTIME_753	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 753
egen AGTIME_754	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 754
egen AGTIME_755	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 755
egen AGTIME_756	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 756
egen AGTIME_757	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 757
egen AGTIME_758	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 758
egen AGTIME_759	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 759
egen AGTIME_760	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 760
egen AGTIME_761	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 761
egen AGTIME_762	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 762
egen AGTIME_763	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 763
egen AGTIME_764	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 764
egen AGTIME_765	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 765
egen AGTIME_766	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 766
egen AGTIME_767	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 767
egen AGTIME_768	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 768
egen AGTIME_769	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 769
egen AGTIME_770	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 770
egen AGTIME_771	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 771
egen AGTIME_772	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 772
egen AGTIME_773	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 773
egen AGTIME_774	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 774
egen AGTIME_775	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 775
egen AGTIME_776	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 776
egen AGTIME_777	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 777
egen AGTIME_778	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 778
egen AGTIME_779	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 779
egen AGTIME_780	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 780
egen AGTIME_781	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 781
egen AGTIME_782	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 782
egen AGTIME_783	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 783
egen AGTIME_784	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 784
egen AGTIME_785	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 785
egen AGTIME_786	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 786
egen AGTIME_787	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 787
egen AGTIME_788	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 788
egen AGTIME_789	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 789
egen AGTIME_790	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 790
egen AGTIME_791	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 791
egen AGTIME_792	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 792
egen AGTIME_793	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 793
egen AGTIME_794	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 794
egen AGTIME_795	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 795
egen AGTIME_796	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 796
egen AGTIME_797	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 797
egen AGTIME_798	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 798
egen AGTIME_799	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 799
egen AGTIME_800	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 800
egen AGTIME_801	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 801
egen AGTIME_802	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 802
egen AGTIME_803	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 803
egen AGTIME_804	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 804
egen AGTIME_805	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 805
egen AGTIME_806	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 806
egen AGTIME_807	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 807
egen AGTIME_808	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 808
egen AGTIME_809	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 809
egen AGTIME_810	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 810
egen AGTIME_811	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 811
egen AGTIME_812	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 812
egen AGTIME_813	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 813
egen AGTIME_814	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 814
egen AGTIME_815	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 815
egen AGTIME_816	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 816
egen AGTIME_817	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 817
egen AGTIME_818	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 818
egen AGTIME_819	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 819
egen AGTIME_820	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 820
egen AGTIME_821	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 821
egen AGTIME_822	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 822
egen AGTIME_823	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 823
egen AGTIME_824	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 824
egen AGTIME_825	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 825
egen AGTIME_826	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 826
egen AGTIME_827	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 827
egen AGTIME_828	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 828
egen AGTIME_829	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 829
egen AGTIME_830	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 830
egen AGTIME_831	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 831
egen AGTIME_832	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 832
egen AGTIME_833	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 833
egen AGTIME_834	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 834
egen AGTIME_835	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 835
egen AGTIME_836	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 836
egen AGTIME_837	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 837
egen AGTIME_838	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 838
egen AGTIME_839	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 839
egen AGTIME_840	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 840
egen AGTIME_841	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 841
egen AGTIME_842	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 842
egen AGTIME_843	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 843
egen AGTIME_844	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 844
egen AGTIME_845	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 845
egen AGTIME_846	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 846
egen AGTIME_847	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 847
egen AGTIME_848	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 848
egen AGTIME_849	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 849
egen AGTIME_850	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 850
egen AGTIME_851	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 851
egen AGTIME_852	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 852
egen AGTIME_853	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 853
egen AGTIME_854	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 854
egen AGTIME_855	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 855
egen AGTIME_856	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 856
egen AGTIME_857	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 857
egen AGTIME_858	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 858
egen AGTIME_859	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 859
egen AGTIME_860	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 860
egen AGTIME_861	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 861
egen AGTIME_862	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 862
egen AGTIME_863	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 863
egen AGTIME_864	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 864
egen AGTIME_865	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 865
egen AGTIME_866	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 866
egen AGTIME_867	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 867
egen AGTIME_868	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 868
egen AGTIME_869	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 869
egen AGTIME_870	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 870
egen AGTIME_871	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 871
egen AGTIME_872	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 872
egen AGTIME_873	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 873
egen AGTIME_874	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 874
egen AGTIME_875	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 875
egen AGTIME_876	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 876
egen AGTIME_877	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 877
egen AGTIME_878	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 878
egen AGTIME_879	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 879
egen AGTIME_880	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 880
egen AGTIME_881	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 881
egen AGTIME_882	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 882
egen AGTIME_883	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 883
egen AGTIME_884	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 884
egen AGTIME_885	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 885
egen AGTIME_886	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 886
egen AGTIME_887	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 887
egen AGTIME_888	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 888
egen AGTIME_889	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 889
egen AGTIME_890	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 890
egen AGTIME_891	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 891
egen AGTIME_892	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 892
egen AGTIME_893	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 893
egen AGTIME_894	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 894
egen AGTIME_895	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 895
egen AGTIME_896	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 896
egen AGTIME_897	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 897
egen AGTIME_898	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 898
egen AGTIME_899	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 899
egen AGTIME_900	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 900
egen AGTIME_901	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 901
egen AGTIME_902	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 902
egen AGTIME_903	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 903
egen AGTIME_904	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 904
egen AGTIME_905	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 905
egen AGTIME_906	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 906
egen AGTIME_907	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 907
egen AGTIME_908	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 908
egen AGTIME_909	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 909
egen AGTIME_910	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 910
egen AGTIME_911	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 911
egen AGTIME_912	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 912
egen AGTIME_913	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 913
egen AGTIME_914	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 914
egen AGTIME_915	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 915
egen AGTIME_916	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 916
egen AGTIME_917	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 917
egen AGTIME_918	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 918
egen AGTIME_919	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 919
egen AGTIME_920	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 920
egen AGTIME_921	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 921
egen AGTIME_922	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 922
egen AGTIME_923	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 923
egen AGTIME_924	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 924
egen AGTIME_925	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 925
egen AGTIME_926	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 926
egen AGTIME_927	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 927
egen AGTIME_928	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 928
egen AGTIME_929	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 929
egen AGTIME_930	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 930
egen AGTIME_931	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 931
egen AGTIME_932	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 932
egen AGTIME_933	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 933
egen AGTIME_934	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 934
egen AGTIME_935	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 935
egen AGTIME_936	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 936
egen AGTIME_937	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 937
egen AGTIME_938	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 938
egen AGTIME_939	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 939
egen AGTIME_940	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 940
egen AGTIME_941	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 941
egen AGTIME_942	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 942
egen AGTIME_943	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 943
egen AGTIME_944	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 944
egen AGTIME_945	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 945
egen AGTIME_946	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 946
egen AGTIME_947	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 947
egen AGTIME_948	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 948
egen AGTIME_949	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 949
egen AGTIME_950	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 950
egen AGTIME_951	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 951
egen AGTIME_952	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 952
egen AGTIME_953	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 953
egen AGTIME_954	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 954
egen AGTIME_955	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 955
egen AGTIME_956	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 956
egen AGTIME_957	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 957
egen AGTIME_958	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 958
egen AGTIME_959	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 959
egen AGTIME_960	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 960
egen AGTIME_961	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 961
egen AGTIME_962	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 962
egen AGTIME_963	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 963
egen AGTIME_964	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 964
egen AGTIME_965	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 965
egen AGTIME_966	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 966
egen AGTIME_967	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 967
egen AGTIME_968	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 968
egen AGTIME_969	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 969
egen AGTIME_970	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 970
egen AGTIME_971	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 971
egen AGTIME_972	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 972
egen AGTIME_973	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 973
egen AGTIME_974	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 974
egen AGTIME_975	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 975
egen AGTIME_976	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 976
egen AGTIME_977	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 977
egen AGTIME_978	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 978
egen AGTIME_979	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 979
egen AGTIME_980	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 980
egen AGTIME_981	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 981
egen AGTIME_982	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 982
egen AGTIME_983	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 983
egen AGTIME_984	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 984
egen AGTIME_985	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 985
egen AGTIME_986	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 986
egen AGTIME_987	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 987
egen AGTIME_988	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 988
egen AGTIME_989	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 989
egen AGTIME_990	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 990
egen AGTIME_991	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 991
egen AGTIME_992	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 992
egen AGTIME_993	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 993
egen AGTIME_994	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 994
egen AGTIME_995	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 995
egen AGTIME_996	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 996
egen AGTIME_997	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 997
egen AGTIME_998	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 998
egen AGTIME_999	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 999
egen AGTIME_1000	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1000

save "C:\NAMED_DIRECTORY\1033_StateQTRData_2014_2023.dta", replace
clear

**REPLACE AND DROP 501-1000
use "C:\NAMED_DIRECTORY\1033_StateQTRData_2014_2023.dta"
replace AGTIME_ID = AGTIME_501	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_502	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_503	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_504	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_505	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_506	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_507	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_508	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_509	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_510	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_511	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_512	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_513	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_514	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_515	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_516	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_517	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_518	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_519	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_520	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_521	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_522	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_523	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_524	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_525	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_526	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_527	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_528	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_529	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_530	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_531	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_532	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_533	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_534	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_535	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_536	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_537	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_538	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_539	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_540	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_541	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_542	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_543	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_544	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_545	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_546	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_547	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_548	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_549	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_550	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_551	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_552	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_553	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_554	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_555	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_556	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_557	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_558	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_559	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_560	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_561	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_562	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_563	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_564	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_565	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_566	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_567	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_568	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_569	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_570	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_571	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_572	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_573	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_574	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_575	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_576	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_577	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_578	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_579	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_580	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_581	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_582	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_583	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_584	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_585	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_586	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_587	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_588	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_589	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_590	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_591	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_592	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_593	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_594	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_595	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_596	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_597	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_598	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_599	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_600	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_601	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_602	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_603	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_604	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_605	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_606	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_607	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_608	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_609	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_610	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_611	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_612	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_613	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_614	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_615	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_616	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_617	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_618	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_619	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_620	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_621	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_622	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_623	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_624	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_625	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_626	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_627	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_628	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_629	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_630	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_631	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_632	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_633	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_634	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_635	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_636	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_637	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_638	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_639	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_640	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_641	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_642	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_643	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_644	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_645	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_646	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_647	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_648	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_649	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_650	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_651	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_652	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_653	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_654	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_655	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_656	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_657	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_658	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_659	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_660	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_661	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_662	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_663	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_664	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_665	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_666	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_667	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_668	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_669	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_670	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_671	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_672	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_673	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_674	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_675	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_676	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_677	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_678	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_679	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_680	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_681	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_682	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_683	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_684	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_685	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_686	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_687	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_688	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_689	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_690	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_691	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_692	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_693	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_694	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_695	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_696	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_697	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_698	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_699	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_700	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_701	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_702	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_703	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_704	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_705	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_706	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_707	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_708	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_709	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_710	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_711	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_712	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_713	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_714	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_715	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_716	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_717	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_718	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_719	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_720	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_721	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_722	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_723	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_724	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_725	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_726	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_727	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_728	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_729	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_730	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_731	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_732	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_733	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_734	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_735	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_736	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_737	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_738	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_739	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_740	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_741	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_742	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_743	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_744	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_745	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_746	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_747	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_748	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_749	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_750	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_751	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_752	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_753	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_754	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_755	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_756	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_757	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_758	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_759	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_760	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_761	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_762	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_763	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_764	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_765	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_766	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_767	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_768	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_769	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_770	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_771	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_772	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_773	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_774	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_775	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_776	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_777	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_778	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_779	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_780	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_781	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_782	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_783	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_784	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_785	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_786	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_787	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_788	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_789	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_790	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_791	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_792	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_793	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_794	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_795	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_796	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_797	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_798	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_799	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_800	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_801	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_802	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_803	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_804	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_805	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_806	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_807	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_808	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_809	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_810	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_811	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_812	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_813	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_814	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_815	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_816	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_817	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_818	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_819	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_820	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_821	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_822	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_823	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_824	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_825	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_826	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_827	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_828	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_829	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_830	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_831	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_832	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_833	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_834	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_835	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_836	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_837	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_838	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_839	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_840	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_841	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_842	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_843	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_844	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_845	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_846	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_847	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_848	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_849	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_850	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_851	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_852	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_853	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_854	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_855	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_856	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_857	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_858	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_859	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_860	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_861	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_862	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_863	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_864	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_865	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_866	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_867	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_868	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_869	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_870	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_871	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_872	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_873	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_874	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_875	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_876	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_877	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_878	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_879	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_880	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_881	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_882	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_883	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_884	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_885	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_886	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_887	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_888	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_889	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_890	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_891	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_892	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_893	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_894	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_895	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_896	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_897	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_898	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_899	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_900	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_901	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_902	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_903	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_904	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_905	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_906	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_907	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_908	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_909	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_910	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_911	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_912	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_913	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_914	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_915	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_916	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_917	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_918	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_919	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_920	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_921	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_922	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_923	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_924	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_925	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_926	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_927	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_928	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_929	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_930	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_931	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_932	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_933	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_934	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_935	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_936	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_937	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_938	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_939	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_940	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_941	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_942	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_943	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_944	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_945	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_946	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_947	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_948	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_949	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_950	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_951	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_952	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_953	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_954	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_955	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_956	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_957	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_958	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_959	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_960	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_961	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_962	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_963	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_964	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_965	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_966	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_967	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_968	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_969	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_970	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_971	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_972	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_973	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_974	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_975	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_976	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_977	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_978	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_979	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_980	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_981	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_982	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_983	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_984	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_985	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_986	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_987	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_988	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_989	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_990	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_991	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_992	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_993	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_994	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_995	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_996	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_997	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_998	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_999	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1000	if AGTIME_ID == .

drop AGTIME_501-AGTIME_1000

save "C:\NAMED_DIRECTORY\1033_StateQTRData_2014_2023.dta", replace
clear

**VARIABLE BLOCK 1001-1500
use "C:\NAMED_DIRECTORY\1033_StateQTRData_2014_2023.dta"
egen AGTIME_1001	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1001
egen AGTIME_1002	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1002
egen AGTIME_1003	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1003
egen AGTIME_1004	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1004
egen AGTIME_1005	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1005
egen AGTIME_1006	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1006
egen AGTIME_1007	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1007
egen AGTIME_1008	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1008
egen AGTIME_1009	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1009
egen AGTIME_1010	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1010
egen AGTIME_1011	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1011
egen AGTIME_1012	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1012
egen AGTIME_1013	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1013
egen AGTIME_1014	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1014
egen AGTIME_1015	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1015
egen AGTIME_1016	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1016
egen AGTIME_1017	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1017
egen AGTIME_1018	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1018
egen AGTIME_1019	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1019
egen AGTIME_1020	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1020
egen AGTIME_1021	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1021
egen AGTIME_1022	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1022
egen AGTIME_1023	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1023
egen AGTIME_1024	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1024
egen AGTIME_1025	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1025
egen AGTIME_1026	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1026
egen AGTIME_1027	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1027
egen AGTIME_1028	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1028
egen AGTIME_1029	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1029
egen AGTIME_1030	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1030
egen AGTIME_1031	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1031
egen AGTIME_1032	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1032
egen AGTIME_1033	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1033
egen AGTIME_1034	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1034
egen AGTIME_1035	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1035
egen AGTIME_1036	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1036
egen AGTIME_1037	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1037
egen AGTIME_1038	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1038
egen AGTIME_1039	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1039
egen AGTIME_1040	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1040
egen AGTIME_1041	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1041
egen AGTIME_1042	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1042
egen AGTIME_1043	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1043
egen AGTIME_1044	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1044
egen AGTIME_1045	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1045
egen AGTIME_1046	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1046
egen AGTIME_1047	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1047
egen AGTIME_1048	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1048
egen AGTIME_1049	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1049
egen AGTIME_1050	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1050
egen AGTIME_1051	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1051
egen AGTIME_1052	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1052
egen AGTIME_1053	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1053
egen AGTIME_1054	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1054
egen AGTIME_1055	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1055
egen AGTIME_1056	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1056
egen AGTIME_1057	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1057
egen AGTIME_1058	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1058
egen AGTIME_1059	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1059
egen AGTIME_1060	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1060
egen AGTIME_1061	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1061
egen AGTIME_1062	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1062
egen AGTIME_1063	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1063
egen AGTIME_1064	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1064
egen AGTIME_1065	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1065
egen AGTIME_1066	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1066
egen AGTIME_1067	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1067
egen AGTIME_1068	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1068
egen AGTIME_1069	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1069
egen AGTIME_1070	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1070
egen AGTIME_1071	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1071
egen AGTIME_1072	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1072
egen AGTIME_1073	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1073
egen AGTIME_1074	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1074
egen AGTIME_1075	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1075
egen AGTIME_1076	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1076
egen AGTIME_1077	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1077
egen AGTIME_1078	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1078
egen AGTIME_1079	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1079
egen AGTIME_1080	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1080
egen AGTIME_1081	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1081
egen AGTIME_1082	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1082
egen AGTIME_1083	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1083
egen AGTIME_1084	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1084
egen AGTIME_1085	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1085
egen AGTIME_1086	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1086
egen AGTIME_1087	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1087
egen AGTIME_1088	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1088
egen AGTIME_1089	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1089
egen AGTIME_1090	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1090
egen AGTIME_1091	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1091
egen AGTIME_1092	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1092
egen AGTIME_1093	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1093
egen AGTIME_1094	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1094
egen AGTIME_1095	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1095
egen AGTIME_1096	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1096
egen AGTIME_1097	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1097
egen AGTIME_1098	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1098
egen AGTIME_1099	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1099
egen AGTIME_1100	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1100
egen AGTIME_1101	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1101
egen AGTIME_1102	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1102
egen AGTIME_1103	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1103
egen AGTIME_1104	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1104
egen AGTIME_1105	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1105
egen AGTIME_1106	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1106
egen AGTIME_1107	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1107
egen AGTIME_1108	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1108
egen AGTIME_1109	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1109
egen AGTIME_1110	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1110
egen AGTIME_1111	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1111
egen AGTIME_1112	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1112
egen AGTIME_1113	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1113
egen AGTIME_1114	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1114
egen AGTIME_1115	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1115
egen AGTIME_1116	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1116
egen AGTIME_1117	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1117
egen AGTIME_1118	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1118
egen AGTIME_1119	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1119
egen AGTIME_1120	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1120
egen AGTIME_1121	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1121
egen AGTIME_1122	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1122
egen AGTIME_1123	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1123
egen AGTIME_1124	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1124
egen AGTIME_1125	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1125
egen AGTIME_1126	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1126
egen AGTIME_1127	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1127
egen AGTIME_1128	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1128
egen AGTIME_1129	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1129
egen AGTIME_1130	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1130
egen AGTIME_1131	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1131
egen AGTIME_1132	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1132
egen AGTIME_1133	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1133
egen AGTIME_1134	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1134
egen AGTIME_1135	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1135
egen AGTIME_1136	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1136
egen AGTIME_1137	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1137
egen AGTIME_1138	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1138
egen AGTIME_1139	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1139
egen AGTIME_1140	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1140
egen AGTIME_1141	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1141
egen AGTIME_1142	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1142
egen AGTIME_1143	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1143
egen AGTIME_1144	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1144
egen AGTIME_1145	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1145
egen AGTIME_1146	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1146
egen AGTIME_1147	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1147
egen AGTIME_1148	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1148
egen AGTIME_1149	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1149
egen AGTIME_1150	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1150
egen AGTIME_1151	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1151
egen AGTIME_1152	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1152
egen AGTIME_1153	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1153
egen AGTIME_1154	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1154
egen AGTIME_1155	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1155
egen AGTIME_1156	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1156
egen AGTIME_1157	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1157
egen AGTIME_1158	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1158
egen AGTIME_1159	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1159
egen AGTIME_1160	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1160
egen AGTIME_1161	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1161
egen AGTIME_1162	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1162
egen AGTIME_1163	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1163
egen AGTIME_1164	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1164
egen AGTIME_1165	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1165
egen AGTIME_1166	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1166
egen AGTIME_1167	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1167
egen AGTIME_1168	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1168
egen AGTIME_1169	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1169
egen AGTIME_1170	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1170
egen AGTIME_1171	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1171
egen AGTIME_1172	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1172
egen AGTIME_1173	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1173
egen AGTIME_1174	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1174
egen AGTIME_1175	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1175
egen AGTIME_1176	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1176
egen AGTIME_1177	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1177
egen AGTIME_1178	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1178
egen AGTIME_1179	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1179
egen AGTIME_1180	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1180
egen AGTIME_1181	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1181
egen AGTIME_1182	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1182
egen AGTIME_1183	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1183
egen AGTIME_1184	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1184
egen AGTIME_1185	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1185
egen AGTIME_1186	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1186
egen AGTIME_1187	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1187
egen AGTIME_1188	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1188
egen AGTIME_1189	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1189
egen AGTIME_1190	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1190
egen AGTIME_1191	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1191
egen AGTIME_1192	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1192
egen AGTIME_1193	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1193
egen AGTIME_1194	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1194
egen AGTIME_1195	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1195
egen AGTIME_1196	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1196
egen AGTIME_1197	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1197
egen AGTIME_1198	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1198
egen AGTIME_1199	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1199
egen AGTIME_1200	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1200
egen AGTIME_1201	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1201
egen AGTIME_1202	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1202
egen AGTIME_1203	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1203
egen AGTIME_1204	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1204
egen AGTIME_1205	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1205
egen AGTIME_1206	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1206
egen AGTIME_1207	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1207
egen AGTIME_1208	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1208
egen AGTIME_1209	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1209
egen AGTIME_1210	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1210
egen AGTIME_1211	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1211
egen AGTIME_1212	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1212
egen AGTIME_1213	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1213
egen AGTIME_1214	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1214
egen AGTIME_1215	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1215
egen AGTIME_1216	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1216
egen AGTIME_1217	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1217
egen AGTIME_1218	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1218
egen AGTIME_1219	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1219
egen AGTIME_1220	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1220
egen AGTIME_1221	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1221
egen AGTIME_1222	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1222
egen AGTIME_1223	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1223
egen AGTIME_1224	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1224
egen AGTIME_1225	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1225
egen AGTIME_1226	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1226
egen AGTIME_1227	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1227
egen AGTIME_1228	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1228
egen AGTIME_1229	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1229
egen AGTIME_1230	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1230
egen AGTIME_1231	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1231
egen AGTIME_1232	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1232
egen AGTIME_1233	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1233
egen AGTIME_1234	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1234
egen AGTIME_1235	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1235
egen AGTIME_1236	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1236
egen AGTIME_1237	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1237
egen AGTIME_1238	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1238
egen AGTIME_1239	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1239
egen AGTIME_1240	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1240
egen AGTIME_1241	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1241
egen AGTIME_1242	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1242
egen AGTIME_1243	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1243
egen AGTIME_1244	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1244
egen AGTIME_1245	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1245
egen AGTIME_1246	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1246
egen AGTIME_1247	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1247
egen AGTIME_1248	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1248
egen AGTIME_1249	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1249
egen AGTIME_1250	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1250
egen AGTIME_1251	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1251
egen AGTIME_1252	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1252
egen AGTIME_1253	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1253
egen AGTIME_1254	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1254
egen AGTIME_1255	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1255
egen AGTIME_1256	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1256
egen AGTIME_1257	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1257
egen AGTIME_1258	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1258
egen AGTIME_1259	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1259
egen AGTIME_1260	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1260
egen AGTIME_1261	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1261
egen AGTIME_1262	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1262
egen AGTIME_1263	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1263
egen AGTIME_1264	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1264
egen AGTIME_1265	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1265
egen AGTIME_1266	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1266
egen AGTIME_1267	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1267
egen AGTIME_1268	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1268
egen AGTIME_1269	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1269
egen AGTIME_1270	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1270
egen AGTIME_1271	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1271
egen AGTIME_1272	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1272
egen AGTIME_1273	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1273
egen AGTIME_1274	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1274
egen AGTIME_1275	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1275
egen AGTIME_1276	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1276
egen AGTIME_1277	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1277
egen AGTIME_1278	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1278
egen AGTIME_1279	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1279
egen AGTIME_1280	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1280
egen AGTIME_1281	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1281
egen AGTIME_1282	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1282
egen AGTIME_1283	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1283
egen AGTIME_1284	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1284
egen AGTIME_1285	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1285
egen AGTIME_1286	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1286
egen AGTIME_1287	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1287
egen AGTIME_1288	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1288
egen AGTIME_1289	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1289
egen AGTIME_1290	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1290
egen AGTIME_1291	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1291
egen AGTIME_1292	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1292
egen AGTIME_1293	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1293
egen AGTIME_1294	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1294
egen AGTIME_1295	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1295
egen AGTIME_1296	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1296
egen AGTIME_1297	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1297
egen AGTIME_1298	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1298
egen AGTIME_1299	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1299
egen AGTIME_1300	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1300
egen AGTIME_1301	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1301
egen AGTIME_1302	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1302
egen AGTIME_1303	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1303
egen AGTIME_1304	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1304
egen AGTIME_1305	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1305
egen AGTIME_1306	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1306
egen AGTIME_1307	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1307
egen AGTIME_1308	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1308
egen AGTIME_1309	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1309
egen AGTIME_1310	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1310
egen AGTIME_1311	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1311
egen AGTIME_1312	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1312
egen AGTIME_1313	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1313
egen AGTIME_1314	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1314
egen AGTIME_1315	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1315
egen AGTIME_1316	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1316
egen AGTIME_1317	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1317
egen AGTIME_1318	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1318
egen AGTIME_1319	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1319
egen AGTIME_1320	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1320
egen AGTIME_1321	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1321
egen AGTIME_1322	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1322
egen AGTIME_1323	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1323
egen AGTIME_1324	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1324
egen AGTIME_1325	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1325
egen AGTIME_1326	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1326
egen AGTIME_1327	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1327
egen AGTIME_1328	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1328
egen AGTIME_1329	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1329
egen AGTIME_1330	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1330
egen AGTIME_1331	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1331
egen AGTIME_1332	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1332
egen AGTIME_1333	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1333
egen AGTIME_1334	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1334
egen AGTIME_1335	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1335
egen AGTIME_1336	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1336
egen AGTIME_1337	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1337
egen AGTIME_1338	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1338
egen AGTIME_1339	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1339
egen AGTIME_1340	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1340
egen AGTIME_1341	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1341
egen AGTIME_1342	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1342
egen AGTIME_1343	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1343
egen AGTIME_1344	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1344
egen AGTIME_1345	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1345
egen AGTIME_1346	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1346
egen AGTIME_1347	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1347
egen AGTIME_1348	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1348
egen AGTIME_1349	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1349
egen AGTIME_1350	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1350
egen AGTIME_1351	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1351
egen AGTIME_1352	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1352
egen AGTIME_1353	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1353
egen AGTIME_1354	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1354
egen AGTIME_1355	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1355
egen AGTIME_1356	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1356
egen AGTIME_1357	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1357
egen AGTIME_1358	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1358
egen AGTIME_1359	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1359
egen AGTIME_1360	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1360
egen AGTIME_1361	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1361
egen AGTIME_1362	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1362
egen AGTIME_1363	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1363
egen AGTIME_1364	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1364
egen AGTIME_1365	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1365
egen AGTIME_1366	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1366
egen AGTIME_1367	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1367
egen AGTIME_1368	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1368
egen AGTIME_1369	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1369
egen AGTIME_1370	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1370
egen AGTIME_1371	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1371
egen AGTIME_1372	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1372
egen AGTIME_1373	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1373
egen AGTIME_1374	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1374
egen AGTIME_1375	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1375
egen AGTIME_1376	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1376
egen AGTIME_1377	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1377
egen AGTIME_1378	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1378
egen AGTIME_1379	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1379
egen AGTIME_1380	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1380
egen AGTIME_1381	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1381
egen AGTIME_1382	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1382
egen AGTIME_1383	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1383
egen AGTIME_1384	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1384
egen AGTIME_1385	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1385
egen AGTIME_1386	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1386
egen AGTIME_1387	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1387
egen AGTIME_1388	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1388
egen AGTIME_1389	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1389
egen AGTIME_1390	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1390
egen AGTIME_1391	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1391
egen AGTIME_1392	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1392
egen AGTIME_1393	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1393
egen AGTIME_1394	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1394
egen AGTIME_1395	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1395
egen AGTIME_1396	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1396
egen AGTIME_1397	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1397
egen AGTIME_1398	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1398
egen AGTIME_1399	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1399
egen AGTIME_1400	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1400
egen AGTIME_1401	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1401
egen AGTIME_1402	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1402
egen AGTIME_1403	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1403
egen AGTIME_1404	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1404
egen AGTIME_1405	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1405
egen AGTIME_1406	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1406
egen AGTIME_1407	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1407
egen AGTIME_1408	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1408
egen AGTIME_1409	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1409
egen AGTIME_1410	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1410
egen AGTIME_1411	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1411
egen AGTIME_1412	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1412
egen AGTIME_1413	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1413
egen AGTIME_1414	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1414
egen AGTIME_1415	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1415
egen AGTIME_1416	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1416
egen AGTIME_1417	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1417
egen AGTIME_1418	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1418
egen AGTIME_1419	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1419
egen AGTIME_1420	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1420
egen AGTIME_1421	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1421
egen AGTIME_1422	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1422
egen AGTIME_1423	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1423
egen AGTIME_1424	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1424
egen AGTIME_1425	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1425
egen AGTIME_1426	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1426
egen AGTIME_1427	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1427
egen AGTIME_1428	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1428
egen AGTIME_1429	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1429
egen AGTIME_1430	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1430
egen AGTIME_1431	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1431
egen AGTIME_1432	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1432
egen AGTIME_1433	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1433
egen AGTIME_1434	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1434
egen AGTIME_1435	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1435
egen AGTIME_1436	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1436
egen AGTIME_1437	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1437
egen AGTIME_1438	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1438
egen AGTIME_1439	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1439
egen AGTIME_1440	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1440
egen AGTIME_1441	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1441
egen AGTIME_1442	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1442
egen AGTIME_1443	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1443
egen AGTIME_1444	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1444
egen AGTIME_1445	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1445
egen AGTIME_1446	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1446
egen AGTIME_1447	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1447
egen AGTIME_1448	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1448
egen AGTIME_1449	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1449
egen AGTIME_1450	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1450
egen AGTIME_1451	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1451
egen AGTIME_1452	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1452
egen AGTIME_1453	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1453
egen AGTIME_1454	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1454
egen AGTIME_1455	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1455
egen AGTIME_1456	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1456
egen AGTIME_1457	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1457
egen AGTIME_1458	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1458
egen AGTIME_1459	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1459
egen AGTIME_1460	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1460
egen AGTIME_1461	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1461
egen AGTIME_1462	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1462
egen AGTIME_1463	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1463
egen AGTIME_1464	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1464
egen AGTIME_1465	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1465
egen AGTIME_1466	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1466
egen AGTIME_1467	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1467
egen AGTIME_1468	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1468
egen AGTIME_1469	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1469
egen AGTIME_1470	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1470
egen AGTIME_1471	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1471
egen AGTIME_1472	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1472
egen AGTIME_1473	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1473
egen AGTIME_1474	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1474
egen AGTIME_1475	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1475
egen AGTIME_1476	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1476
egen AGTIME_1477	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1477
egen AGTIME_1478	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1478
egen AGTIME_1479	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1479
egen AGTIME_1480	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1480
egen AGTIME_1481	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1481
egen AGTIME_1482	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1482
egen AGTIME_1483	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1483
egen AGTIME_1484	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1484
egen AGTIME_1485	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1485
egen AGTIME_1486	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1486
egen AGTIME_1487	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1487
egen AGTIME_1488	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1488
egen AGTIME_1489	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1489
egen AGTIME_1490	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1490
egen AGTIME_1491	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1491
egen AGTIME_1492	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1492
egen AGTIME_1493	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1493
egen AGTIME_1494	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1494
egen AGTIME_1495	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1495
egen AGTIME_1496	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1496
egen AGTIME_1497	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1497
egen AGTIME_1498	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1498
egen AGTIME_1499	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1499
egen AGTIME_1500	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1500

save "C:\NAMED_DIRECTORY\1033_StateQTRData_2014_2023.dta", replace
clear

**REPLACE AND DROP 1001-1500
use "C:\NAMED_DIRECTORY\1033_StateQTRData_2014_2023.dta"
replace AGTIME_ID =	AGTIME_1001	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1002	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1003	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1004	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1005	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1006	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1007	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1008	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1009	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1010	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1011	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1012	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1013	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1014	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1015	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1016	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1017	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1018	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1019	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1020	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1021	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1022	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1023	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1024	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1025	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1026	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1027	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1028	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1029	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1030	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1031	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1032	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1033	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1034	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1035	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1036	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1037	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1038	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1039	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1040	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1041	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1042	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1043	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1044	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1045	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1046	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1047	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1048	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1049	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1050	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1051	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1052	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1053	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1054	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1055	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1056	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1057	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1058	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1059	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1060	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1061	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1062	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1063	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1064	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1065	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1066	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1067	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1068	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1069	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1070	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1071	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1072	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1073	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1074	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1075	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1076	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1077	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1078	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1079	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1080	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1081	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1082	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1083	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1084	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1085	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1086	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1087	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1088	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1089	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1090	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1091	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1092	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1093	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1094	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1095	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1096	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1097	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1098	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1099	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1100	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1101	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1102	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1103	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1104	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1105	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1106	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1107	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1108	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1109	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1110	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1111	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1112	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1113	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1114	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1115	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1116	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1117	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1118	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1119	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1120	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1121	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1122	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1123	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1124	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1125	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1126	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1127	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1128	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1129	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1130	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1131	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1132	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1133	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1134	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1135	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1136	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1137	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1138	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1139	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1140	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1141	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1142	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1143	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1144	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1145	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1146	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1147	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1148	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1149	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1150	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1151	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1152	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1153	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1154	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1155	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1156	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1157	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1158	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1159	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1160	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1161	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1162	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1163	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1164	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1165	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1166	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1167	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1168	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1169	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1170	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1171	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1172	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1173	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1174	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1175	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1176	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1177	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1178	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1179	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1180	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1181	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1182	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1183	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1184	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1185	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1186	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1187	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1188	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1189	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1190	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1191	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1192	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1193	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1194	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1195	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1196	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1197	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1198	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1199	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1200	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1201	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1202	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1203	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1204	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1205	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1206	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1207	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1208	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1209	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1210	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1211	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1212	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1213	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1214	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1215	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1216	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1217	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1218	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1219	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1220	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1221	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1222	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1223	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1224	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1225	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1226	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1227	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1228	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1229	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1230	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1231	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1232	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1233	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1234	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1235	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1236	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1237	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1238	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1239	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1240	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1241	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1242	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1243	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1244	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1245	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1246	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1247	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1248	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1249	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1250	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1251	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1252	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1253	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1254	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1255	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1256	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1257	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1258	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1259	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1260	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1261	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1262	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1263	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1264	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1265	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1266	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1267	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1268	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1269	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1270	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1271	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1272	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1273	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1274	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1275	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1276	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1277	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1278	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1279	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1280	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1281	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1282	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1283	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1284	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1285	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1286	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1287	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1288	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1289	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1290	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1291	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1292	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1293	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1294	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1295	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1296	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1297	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1298	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1299	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1300	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1301	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1302	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1303	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1304	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1305	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1306	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1307	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1308	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1309	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1310	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1311	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1312	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1313	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1314	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1315	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1316	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1317	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1318	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1319	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1320	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1321	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1322	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1323	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1324	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1325	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1326	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1327	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1328	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1329	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1330	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1331	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1332	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1333	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1334	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1335	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1336	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1337	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1338	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1339	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1340	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1341	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1342	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1343	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1344	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1345	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1346	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1347	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1348	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1349	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1350	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1351	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1352	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1353	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1354	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1355	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1356	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1357	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1358	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1359	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1360	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1361	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1362	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1363	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1364	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1365	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1366	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1367	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1368	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1369	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1370	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1371	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1372	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1373	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1374	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1375	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1376	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1377	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1378	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1379	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1380	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1381	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1382	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1383	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1384	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1385	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1386	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1387	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1388	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1389	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1390	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1391	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1392	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1393	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1394	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1395	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1396	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1397	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1398	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1399	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1400	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1401	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1402	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1403	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1404	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1405	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1406	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1407	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1408	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1409	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1410	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1411	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1412	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1413	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1414	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1415	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1416	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1417	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1418	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1419	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1420	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1421	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1422	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1423	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1424	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1425	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1426	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1427	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1428	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1429	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1430	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1431	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1432	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1433	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1434	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1435	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1436	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1437	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1438	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1439	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1440	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1441	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1442	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1443	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1444	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1445	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1446	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1447	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1448	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1449	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1450	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1451	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1452	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1453	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1454	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1455	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1456	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1457	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1458	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1459	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1460	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1461	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1462	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1463	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1464	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1465	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1466	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1467	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1468	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1469	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1470	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1471	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1472	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1473	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1474	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1475	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1476	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1477	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1478	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1479	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1480	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1481	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1482	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1483	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1484	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1485	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1486	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1487	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1488	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1489	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1490	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1491	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1492	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1493	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1494	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1495	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1496	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1497	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1498	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1499	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1500	if AGTIME_ID == .

drop AGTIME_1001-AGTIME_1500

save "C:\NAMED_DIRECTORY\1033_StateQTRData_2014_2023.dta", replace
clear

**VARIABLE BLOCK 1501-2000
use "C:\NAMED_DIRECTORY\1033_StateQTRData_2014_2023.dta"
egen AGTIME_1501	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1501
egen AGTIME_1502	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1502
egen AGTIME_1503	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1503
egen AGTIME_1504	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1504
egen AGTIME_1505	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1505
egen AGTIME_1506	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1506
egen AGTIME_1507	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1507
egen AGTIME_1508	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1508
egen AGTIME_1509	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1509
egen AGTIME_1510	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1510
egen AGTIME_1511	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1511
egen AGTIME_1512	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1512
egen AGTIME_1513	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1513
egen AGTIME_1514	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1514
egen AGTIME_1515	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1515
egen AGTIME_1516	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1516
egen AGTIME_1517	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1517
egen AGTIME_1518	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1518
egen AGTIME_1519	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1519
egen AGTIME_1520	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1520
egen AGTIME_1521	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1521
egen AGTIME_1522	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1522
egen AGTIME_1523	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1523
egen AGTIME_1524	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1524
egen AGTIME_1525	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1525
egen AGTIME_1526	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1526
egen AGTIME_1527	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1527
egen AGTIME_1528	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1528
egen AGTIME_1529	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1529
egen AGTIME_1530	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1530
egen AGTIME_1531	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1531
egen AGTIME_1532	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1532
egen AGTIME_1533	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1533
egen AGTIME_1534	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1534
egen AGTIME_1535	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1535
egen AGTIME_1536	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1536
egen AGTIME_1537	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1537
egen AGTIME_1538	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1538
egen AGTIME_1539	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1539
egen AGTIME_1540	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1540
egen AGTIME_1541	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1541
egen AGTIME_1542	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1542
egen AGTIME_1543	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1543
egen AGTIME_1544	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1544
egen AGTIME_1545	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1545
egen AGTIME_1546	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1546
egen AGTIME_1547	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1547
egen AGTIME_1548	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1548
egen AGTIME_1549	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1549
egen AGTIME_1550	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1550
egen AGTIME_1551	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1551
egen AGTIME_1552	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1552
egen AGTIME_1553	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1553
egen AGTIME_1554	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1554
egen AGTIME_1555	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1555
egen AGTIME_1556	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1556
egen AGTIME_1557	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1557
egen AGTIME_1558	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1558
egen AGTIME_1559	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1559
egen AGTIME_1560	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1560
egen AGTIME_1561	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1561
egen AGTIME_1562	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1562
egen AGTIME_1563	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1563
egen AGTIME_1564	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1564
egen AGTIME_1565	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1565
egen AGTIME_1566	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1566
egen AGTIME_1567	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1567
egen AGTIME_1568	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1568
egen AGTIME_1569	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1569
egen AGTIME_1570	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1570
egen AGTIME_1571	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1571
egen AGTIME_1572	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1572
egen AGTIME_1573	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1573
egen AGTIME_1574	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1574
egen AGTIME_1575	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1575
egen AGTIME_1576	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1576
egen AGTIME_1577	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1577
egen AGTIME_1578	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1578
egen AGTIME_1579	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1579
egen AGTIME_1580	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1580
egen AGTIME_1581	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1581
egen AGTIME_1582	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1582
egen AGTIME_1583	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1583
egen AGTIME_1584	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1584
egen AGTIME_1585	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1585
egen AGTIME_1586	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1586
egen AGTIME_1587	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1587
egen AGTIME_1588	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1588
egen AGTIME_1589	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1589
egen AGTIME_1590	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1590
egen AGTIME_1591	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1591
egen AGTIME_1592	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1592
egen AGTIME_1593	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1593
egen AGTIME_1594	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1594
egen AGTIME_1595	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1595
egen AGTIME_1596	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1596
egen AGTIME_1597	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1597
egen AGTIME_1598	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1598
egen AGTIME_1599	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1599
egen AGTIME_1600	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1600
egen AGTIME_1601	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1601
egen AGTIME_1602	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1602
egen AGTIME_1603	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1603
egen AGTIME_1604	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1604
egen AGTIME_1605	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1605
egen AGTIME_1606	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1606
egen AGTIME_1607	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1607
egen AGTIME_1608	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1608
egen AGTIME_1609	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1609
egen AGTIME_1610	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1610
egen AGTIME_1611	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1611
egen AGTIME_1612	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1612
egen AGTIME_1613	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1613
egen AGTIME_1614	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1614
egen AGTIME_1615	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1615
egen AGTIME_1616	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1616
egen AGTIME_1617	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1617
egen AGTIME_1618	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1618
egen AGTIME_1619	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1619
egen AGTIME_1620	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1620
egen AGTIME_1621	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1621
egen AGTIME_1622	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1622
egen AGTIME_1623	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1623
egen AGTIME_1624	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1624
egen AGTIME_1625	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1625
egen AGTIME_1626	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1626
egen AGTIME_1627	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1627
egen AGTIME_1628	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1628
egen AGTIME_1629	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1629
egen AGTIME_1630	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1630
egen AGTIME_1631	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1631
egen AGTIME_1632	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1632
egen AGTIME_1633	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1633
egen AGTIME_1634	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1634
egen AGTIME_1635	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1635
egen AGTIME_1636	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1636
egen AGTIME_1637	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1637
egen AGTIME_1638	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1638
egen AGTIME_1639	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1639
egen AGTIME_1640	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1640
egen AGTIME_1641	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1641
egen AGTIME_1642	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1642
egen AGTIME_1643	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1643
egen AGTIME_1644	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1644
egen AGTIME_1645	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1645
egen AGTIME_1646	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1646
egen AGTIME_1647	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1647
egen AGTIME_1648	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1648
egen AGTIME_1649	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1649
egen AGTIME_1650	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1650
egen AGTIME_1651	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1651
egen AGTIME_1652	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1652
egen AGTIME_1653	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1653
egen AGTIME_1654	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1654
egen AGTIME_1655	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1655
egen AGTIME_1656	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1656
egen AGTIME_1657	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1657
egen AGTIME_1658	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1658
egen AGTIME_1659	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1659
egen AGTIME_1660	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1660
egen AGTIME_1661	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1661
egen AGTIME_1662	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1662
egen AGTIME_1663	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1663
egen AGTIME_1664	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1664
egen AGTIME_1665	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1665
egen AGTIME_1666	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1666
egen AGTIME_1667	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1667
egen AGTIME_1668	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1668
egen AGTIME_1669	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1669
egen AGTIME_1670	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1670
egen AGTIME_1671	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1671
egen AGTIME_1672	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1672
egen AGTIME_1673	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1673
egen AGTIME_1674	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1674
egen AGTIME_1675	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1675
egen AGTIME_1676	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1676
egen AGTIME_1677	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1677
egen AGTIME_1678	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1678
egen AGTIME_1679	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1679
egen AGTIME_1680	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1680
egen AGTIME_1681	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1681
egen AGTIME_1682	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1682
egen AGTIME_1683	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1683
egen AGTIME_1684	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1684
egen AGTIME_1685	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1685
egen AGTIME_1686	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1686
egen AGTIME_1687	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1687
egen AGTIME_1688	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1688
egen AGTIME_1689	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1689
egen AGTIME_1690	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1690
egen AGTIME_1691	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1691
egen AGTIME_1692	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1692
egen AGTIME_1693	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1693
egen AGTIME_1694	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1694
egen AGTIME_1695	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1695
egen AGTIME_1696	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1696
egen AGTIME_1697	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1697
egen AGTIME_1698	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1698
egen AGTIME_1699	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1699
egen AGTIME_1700	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1700
egen AGTIME_1701	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1701
egen AGTIME_1702	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1702
egen AGTIME_1703	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1703
egen AGTIME_1704	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1704
egen AGTIME_1705	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1705
egen AGTIME_1706	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1706
egen AGTIME_1707	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1707
egen AGTIME_1708	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1708
egen AGTIME_1709	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1709
egen AGTIME_1710	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1710
egen AGTIME_1711	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1711
egen AGTIME_1712	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1712
egen AGTIME_1713	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1713
egen AGTIME_1714	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1714
egen AGTIME_1715	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1715
egen AGTIME_1716	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1716
egen AGTIME_1717	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1717
egen AGTIME_1718	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1718
egen AGTIME_1719	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1719
egen AGTIME_1720	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1720
egen AGTIME_1721	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1721
egen AGTIME_1722	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1722
egen AGTIME_1723	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1723
egen AGTIME_1724	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1724
egen AGTIME_1725	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1725
egen AGTIME_1726	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1726
egen AGTIME_1727	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1727
egen AGTIME_1728	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1728
egen AGTIME_1729	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1729
egen AGTIME_1730	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1730
egen AGTIME_1731	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1731
egen AGTIME_1732	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1732
egen AGTIME_1733	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1733
egen AGTIME_1734	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1734
egen AGTIME_1735	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1735
egen AGTIME_1736	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1736
egen AGTIME_1737	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1737
egen AGTIME_1738	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1738
egen AGTIME_1739	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1739
egen AGTIME_1740	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1740
egen AGTIME_1741	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1741
egen AGTIME_1742	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1742
egen AGTIME_1743	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1743
egen AGTIME_1744	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1744
egen AGTIME_1745	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1745
egen AGTIME_1746	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1746
egen AGTIME_1747	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1747
egen AGTIME_1748	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1748
egen AGTIME_1749	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1749
egen AGTIME_1750	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1750
egen AGTIME_1751	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1751
egen AGTIME_1752	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1752
egen AGTIME_1753	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1753
egen AGTIME_1754	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1754
egen AGTIME_1755	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1755
egen AGTIME_1756	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1756
egen AGTIME_1757	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1757
egen AGTIME_1758	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1758
egen AGTIME_1759	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1759
egen AGTIME_1760	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1760
egen AGTIME_1761	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1761
egen AGTIME_1762	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1762
egen AGTIME_1763	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1763
egen AGTIME_1764	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1764
egen AGTIME_1765	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1765
egen AGTIME_1766	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1766
egen AGTIME_1767	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1767
egen AGTIME_1768	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1768
egen AGTIME_1769	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1769
egen AGTIME_1770	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1770
egen AGTIME_1771	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1771
egen AGTIME_1772	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1772
egen AGTIME_1773	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1773
egen AGTIME_1774	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1774
egen AGTIME_1775	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1775
egen AGTIME_1776	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1776
egen AGTIME_1777	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1777
egen AGTIME_1778	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1778
egen AGTIME_1779	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1779
egen AGTIME_1780	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1780
egen AGTIME_1781	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1781
egen AGTIME_1782	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1782
egen AGTIME_1783	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1783
egen AGTIME_1784	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1784
egen AGTIME_1785	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1785
egen AGTIME_1786	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1786
egen AGTIME_1787	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1787
egen AGTIME_1788	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1788
egen AGTIME_1789	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1789
egen AGTIME_1790	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1790
egen AGTIME_1791	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1791
egen AGTIME_1792	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1792
egen AGTIME_1793	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1793
egen AGTIME_1794	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1794
egen AGTIME_1795	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1795
egen AGTIME_1796	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1796
egen AGTIME_1797	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1797
egen AGTIME_1798	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1798
egen AGTIME_1799	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1799
egen AGTIME_1800	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1800
egen AGTIME_1801	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1801
egen AGTIME_1802	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1802
egen AGTIME_1803	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1803
egen AGTIME_1804	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1804
egen AGTIME_1805	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1805
egen AGTIME_1806	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1806
egen AGTIME_1807	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1807
egen AGTIME_1808	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1808
egen AGTIME_1809	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1809
egen AGTIME_1810	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1810
egen AGTIME_1811	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1811
egen AGTIME_1812	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1812
egen AGTIME_1813	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1813
egen AGTIME_1814	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1814
egen AGTIME_1815	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1815
egen AGTIME_1816	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1816
egen AGTIME_1817	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1817
egen AGTIME_1818	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1818
egen AGTIME_1819	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1819
egen AGTIME_1820	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1820
egen AGTIME_1821	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1821
egen AGTIME_1822	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1822
egen AGTIME_1823	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1823
egen AGTIME_1824	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1824
egen AGTIME_1825	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1825
egen AGTIME_1826	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1826
egen AGTIME_1827	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1827
egen AGTIME_1828	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1828
egen AGTIME_1829	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1829
egen AGTIME_1830	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1830
egen AGTIME_1831	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1831
egen AGTIME_1832	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1832
egen AGTIME_1833	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1833
egen AGTIME_1834	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1834
egen AGTIME_1835	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1835
egen AGTIME_1836	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1836
egen AGTIME_1837	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1837
egen AGTIME_1838	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1838
egen AGTIME_1839	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1839
egen AGTIME_1840	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1840
egen AGTIME_1841	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1841
egen AGTIME_1842	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1842
egen AGTIME_1843	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1843
egen AGTIME_1844	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1844
egen AGTIME_1845	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1845
egen AGTIME_1846	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1846
egen AGTIME_1847	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1847
egen AGTIME_1848	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1848
egen AGTIME_1849	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1849
egen AGTIME_1850	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1850
egen AGTIME_1851	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1851
egen AGTIME_1852	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1852
egen AGTIME_1853	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1853
egen AGTIME_1854	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1854
egen AGTIME_1855	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1855
egen AGTIME_1856	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1856
egen AGTIME_1857	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1857
egen AGTIME_1858	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1858
egen AGTIME_1859	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1859
egen AGTIME_1860	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1860
egen AGTIME_1861	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1861
egen AGTIME_1862	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1862
egen AGTIME_1863	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1863
egen AGTIME_1864	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1864
egen AGTIME_1865	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1865
egen AGTIME_1866	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1866
egen AGTIME_1867	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1867
egen AGTIME_1868	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1868
egen AGTIME_1869	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1869
egen AGTIME_1870	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1870
egen AGTIME_1871	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1871
egen AGTIME_1872	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1872
egen AGTIME_1873	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1873
egen AGTIME_1874	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1874
egen AGTIME_1875	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1875
egen AGTIME_1876	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1876
egen AGTIME_1877	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1877
egen AGTIME_1878	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1878
egen AGTIME_1879	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1879
egen AGTIME_1880	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1880
egen AGTIME_1881	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1881
egen AGTIME_1882	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1882
egen AGTIME_1883	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1883
egen AGTIME_1884	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1884
egen AGTIME_1885	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1885
egen AGTIME_1886	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1886
egen AGTIME_1887	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1887
egen AGTIME_1888	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1888
egen AGTIME_1889	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1889
egen AGTIME_1890	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1890
egen AGTIME_1891	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1891
egen AGTIME_1892	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1892
egen AGTIME_1893	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1893
egen AGTIME_1894	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1894
egen AGTIME_1895	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1895
egen AGTIME_1896	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1896
egen AGTIME_1897	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1897
egen AGTIME_1898	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1898
egen AGTIME_1899	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1899
egen AGTIME_1900	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1900
egen AGTIME_1901	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1901
egen AGTIME_1902	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1902
egen AGTIME_1903	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1903
egen AGTIME_1904	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1904
egen AGTIME_1905	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1905
egen AGTIME_1906	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1906
egen AGTIME_1907	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1907
egen AGTIME_1908	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1908
egen AGTIME_1909	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1909
egen AGTIME_1910	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1910
egen AGTIME_1911	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1911
egen AGTIME_1912	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1912
egen AGTIME_1913	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1913
egen AGTIME_1914	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1914
egen AGTIME_1915	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1915
egen AGTIME_1916	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1916
egen AGTIME_1917	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1917
egen AGTIME_1918	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1918
egen AGTIME_1919	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1919
egen AGTIME_1920	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1920
egen AGTIME_1921	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1921
egen AGTIME_1922	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1922
egen AGTIME_1923	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1923
egen AGTIME_1924	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1924
egen AGTIME_1925	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1925
egen AGTIME_1926	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1926
egen AGTIME_1927	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1927
egen AGTIME_1928	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1928
egen AGTIME_1929	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1929
egen AGTIME_1930	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1930
egen AGTIME_1931	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1931
egen AGTIME_1932	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1932
egen AGTIME_1933	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1933
egen AGTIME_1934	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1934
egen AGTIME_1935	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1935
egen AGTIME_1936	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1936
egen AGTIME_1937	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1937
egen AGTIME_1938	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1938
egen AGTIME_1939	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1939
egen AGTIME_1940	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1940
egen AGTIME_1941	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1941
egen AGTIME_1942	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1942
egen AGTIME_1943	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1943
egen AGTIME_1944	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1944
egen AGTIME_1945	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1945
egen AGTIME_1946	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1946
egen AGTIME_1947	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1947
egen AGTIME_1948	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1948
egen AGTIME_1949	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1949
egen AGTIME_1950	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1950
egen AGTIME_1951	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1951
egen AGTIME_1952	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1952
egen AGTIME_1953	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1953
egen AGTIME_1954	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1954
egen AGTIME_1955	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1955
egen AGTIME_1956	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1956
egen AGTIME_1957	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1957
egen AGTIME_1958	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1958
egen AGTIME_1959	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1959
egen AGTIME_1960	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1960
egen AGTIME_1961	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1961
egen AGTIME_1962	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1962
egen AGTIME_1963	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1963
egen AGTIME_1964	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1964
egen AGTIME_1965	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1965
egen AGTIME_1966	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1966
egen AGTIME_1967	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1967
egen AGTIME_1968	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1968
egen AGTIME_1969	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1969
egen AGTIME_1970	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1970
egen AGTIME_1971	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1971
egen AGTIME_1972	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1972
egen AGTIME_1973	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1973
egen AGTIME_1974	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1974
egen AGTIME_1975	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1975
egen AGTIME_1976	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1976
egen AGTIME_1977	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1977
egen AGTIME_1978	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1978
egen AGTIME_1979	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1979
egen AGTIME_1980	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1980
egen AGTIME_1981	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1981
egen AGTIME_1982	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1982
egen AGTIME_1983	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1983
egen AGTIME_1984	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1984
egen AGTIME_1985	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1985
egen AGTIME_1986	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1986
egen AGTIME_1987	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1987
egen AGTIME_1988	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1988
egen AGTIME_1989	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1989
egen AGTIME_1990	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1990
egen AGTIME_1991	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1991
egen AGTIME_1992	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1992
egen AGTIME_1993	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1993
egen AGTIME_1994	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1994
egen AGTIME_1995	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1995
egen AGTIME_1996	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1996
egen AGTIME_1997	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1997
egen AGTIME_1998	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1998
egen AGTIME_1999	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 1999
egen AGTIME_2000	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2000

save "C:\NAMED_DIRECTORY\1033_StateQTRData_2014_2023.dta", replace
clear

**REPLACE AND DROP 1501-2000
use "C:\NAMED_DIRECTORY\1033_StateQTRData_2014_2023.dta"
replace AGTIME_ID =	AGTIME_1501	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1502	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1503	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1504	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1505	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1506	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1507	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1508	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1509	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1510	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1511	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1512	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1513	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1514	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1515	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1516	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1517	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1518	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1519	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1520	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1521	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1522	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1523	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1524	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1525	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1526	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1527	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1528	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1529	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1530	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1531	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1532	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1533	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1534	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1535	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1536	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1537	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1538	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1539	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1540	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1541	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1542	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1543	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1544	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1545	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1546	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1547	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1548	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1549	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1550	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1551	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1552	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1553	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1554	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1555	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1556	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1557	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1558	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1559	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1560	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1561	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1562	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1563	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1564	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1565	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1566	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1567	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1568	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1569	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1570	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1571	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1572	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1573	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1574	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1575	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1576	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1577	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1578	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1579	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1580	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1581	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1582	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1583	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1584	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1585	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1586	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1587	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1588	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1589	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1590	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1591	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1592	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1593	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1594	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1595	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1596	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1597	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1598	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1599	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1600	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1601	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1602	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1603	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1604	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1605	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1606	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1607	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1608	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1609	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1610	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1611	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1612	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1613	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1614	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1615	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1616	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1617	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1618	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1619	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1620	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1621	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1622	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1623	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1624	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1625	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1626	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1627	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1628	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1629	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1630	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1631	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1632	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1633	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1634	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1635	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1636	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1637	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1638	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1639	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1640	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1641	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1642	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1643	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1644	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1645	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1646	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1647	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1648	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1649	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1650	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1651	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1652	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1653	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1654	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1655	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1656	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1657	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1658	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1659	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1660	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1661	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1662	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1663	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1664	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1665	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1666	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1667	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1668	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1669	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1670	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1671	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1672	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1673	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1674	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1675	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1676	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1677	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1678	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1679	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1680	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1681	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1682	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1683	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1684	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1685	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1686	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1687	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1688	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1689	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1690	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1691	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1692	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1693	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1694	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1695	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1696	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1697	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1698	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1699	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1700	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1701	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1702	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1703	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1704	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1705	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1706	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1707	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1708	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1709	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1710	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1711	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1712	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1713	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1714	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1715	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1716	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1717	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1718	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1719	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1720	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1721	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1722	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1723	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1724	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1725	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1726	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1727	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1728	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1729	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1730	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1731	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1732	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1733	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1734	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1735	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1736	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1737	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1738	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1739	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1740	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1741	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1742	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1743	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1744	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1745	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1746	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1747	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1748	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1749	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1750	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1751	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1752	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1753	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1754	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1755	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1756	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1757	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1758	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1759	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1760	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1761	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1762	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1763	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1764	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1765	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1766	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1767	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1768	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1769	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1770	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1771	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1772	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1773	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1774	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1775	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1776	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1777	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1778	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1779	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1780	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1781	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1782	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1783	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1784	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1785	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1786	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1787	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1788	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1789	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1790	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1791	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1792	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1793	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1794	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1795	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1796	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1797	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1798	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1799	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1800	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1801	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1802	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1803	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1804	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1805	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1806	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1807	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1808	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1809	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1810	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1811	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1812	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1813	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1814	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1815	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1816	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1817	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1818	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1819	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1820	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1821	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1822	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1823	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1824	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1825	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1826	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1827	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1828	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1829	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1830	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1831	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1832	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1833	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1834	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1835	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1836	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1837	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1838	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1839	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1840	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1841	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1842	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1843	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1844	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1845	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1846	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1847	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1848	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1849	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1850	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1851	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1852	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1853	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1854	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1855	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1856	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1857	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1858	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1859	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1860	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1861	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1862	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1863	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1864	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1865	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1866	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1867	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1868	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1869	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1870	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1871	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1872	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1873	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1874	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1875	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1876	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1877	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1878	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1879	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1880	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1881	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1882	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1883	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1884	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1885	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1886	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1887	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1888	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1889	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1890	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1891	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1892	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1893	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1894	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1895	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1896	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1897	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1898	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1899	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1900	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1901	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1902	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1903	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1904	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1905	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1906	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1907	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1908	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1909	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1910	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1911	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1912	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1913	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1914	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1915	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1916	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1917	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1918	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1919	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1920	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1921	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1922	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1923	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1924	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1925	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1926	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1927	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1928	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1929	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1930	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1931	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1932	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1933	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1934	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1935	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1936	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1937	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1938	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1939	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1940	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1941	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1942	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1943	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1944	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1945	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1946	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1947	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1948	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1949	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1950	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1951	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1952	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1953	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1954	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1955	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1956	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1957	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1958	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1959	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1960	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1961	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1962	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1963	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1964	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1965	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1966	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1967	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1968	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1969	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1970	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1971	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1972	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1973	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1974	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1975	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1976	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1977	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1978	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1979	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1980	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1981	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1982	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1983	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1984	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1985	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1986	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1987	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1988	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1989	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1990	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1991	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1992	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1993	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1994	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1995	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1996	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1997	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1998	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_1999	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2000	if AGTIME_ID == .

drop AGTIME_1501-AGTIME_2000

save "C:\NAMED_DIRECTORY\1033_StateQTRData_2014_2023.dta", replace
clear

**VARIABLE BLOCK 2001-2500
use "C:\NAMED_DIRECTORY\1033_StateQTRData_2014_2023.dta"
egen AGTIME_2001	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2001
egen AGTIME_2002	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2002
egen AGTIME_2003	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2003
egen AGTIME_2004	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2004
egen AGTIME_2005	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2005
egen AGTIME_2006	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2006
egen AGTIME_2007	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2007
egen AGTIME_2008	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2008
egen AGTIME_2009	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2009
egen AGTIME_2010	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2010
egen AGTIME_2011	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2011
egen AGTIME_2012	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2012
egen AGTIME_2013	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2013
egen AGTIME_2014	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2014
egen AGTIME_2015	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2015
egen AGTIME_2016	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2016
egen AGTIME_2017	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2017
egen AGTIME_2018	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2018
egen AGTIME_2019	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2019
egen AGTIME_2020	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2020
egen AGTIME_2021	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2021
egen AGTIME_2022	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2022
egen AGTIME_2023	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2023
egen AGTIME_2024	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2024
egen AGTIME_2025	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2025
egen AGTIME_2026	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2026
egen AGTIME_2027	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2027
egen AGTIME_2028	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2028
egen AGTIME_2029	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2029
egen AGTIME_2030	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2030
egen AGTIME_2031	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2031
egen AGTIME_2032	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2032
egen AGTIME_2033	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2033
egen AGTIME_2034	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2034
egen AGTIME_2035	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2035
egen AGTIME_2036	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2036
egen AGTIME_2037	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2037
egen AGTIME_2038	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2038
egen AGTIME_2039	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2039
egen AGTIME_2040	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2040
egen AGTIME_2041	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2041
egen AGTIME_2042	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2042
egen AGTIME_2043	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2043
egen AGTIME_2044	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2044
egen AGTIME_2045	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2045
egen AGTIME_2046	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2046
egen AGTIME_2047	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2047
egen AGTIME_2048	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2048
egen AGTIME_2049	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2049
egen AGTIME_2050	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2050
egen AGTIME_2051	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2051
egen AGTIME_2052	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2052
egen AGTIME_2053	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2053
egen AGTIME_2054	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2054
egen AGTIME_2055	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2055
egen AGTIME_2056	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2056
egen AGTIME_2057	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2057
egen AGTIME_2058	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2058
egen AGTIME_2059	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2059
egen AGTIME_2060	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2060
egen AGTIME_2061	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2061
egen AGTIME_2062	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2062
egen AGTIME_2063	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2063
egen AGTIME_2064	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2064
egen AGTIME_2065	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2065
egen AGTIME_2066	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2066
egen AGTIME_2067	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2067
egen AGTIME_2068	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2068
egen AGTIME_2069	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2069
egen AGTIME_2070	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2070
egen AGTIME_2071	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2071
egen AGTIME_2072	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2072
egen AGTIME_2073	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2073
egen AGTIME_2074	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2074
egen AGTIME_2075	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2075
egen AGTIME_2076	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2076
egen AGTIME_2077	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2077
egen AGTIME_2078	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2078
egen AGTIME_2079	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2079
egen AGTIME_2080	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2080
egen AGTIME_2081	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2081
egen AGTIME_2082	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2082
egen AGTIME_2083	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2083
egen AGTIME_2084	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2084
egen AGTIME_2085	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2085
egen AGTIME_2086	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2086
egen AGTIME_2087	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2087
egen AGTIME_2088	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2088
egen AGTIME_2089	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2089
egen AGTIME_2090	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2090
egen AGTIME_2091	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2091
egen AGTIME_2092	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2092
egen AGTIME_2093	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2093
egen AGTIME_2094	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2094
egen AGTIME_2095	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2095
egen AGTIME_2096	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2096
egen AGTIME_2097	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2097
egen AGTIME_2098	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2098
egen AGTIME_2099	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2099
egen AGTIME_2100	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2100
egen AGTIME_2101	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2101
egen AGTIME_2102	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2102
egen AGTIME_2103	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2103
egen AGTIME_2104	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2104
egen AGTIME_2105	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2105
egen AGTIME_2106	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2106
egen AGTIME_2107	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2107
egen AGTIME_2108	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2108
egen AGTIME_2109	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2109
egen AGTIME_2110	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2110
egen AGTIME_2111	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2111
egen AGTIME_2112	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2112
egen AGTIME_2113	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2113
egen AGTIME_2114	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2114
egen AGTIME_2115	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2115
egen AGTIME_2116	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2116
egen AGTIME_2117	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2117
egen AGTIME_2118	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2118
egen AGTIME_2119	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2119
egen AGTIME_2120	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2120
egen AGTIME_2121	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2121
egen AGTIME_2122	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2122
egen AGTIME_2123	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2123
egen AGTIME_2124	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2124
egen AGTIME_2125	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2125
egen AGTIME_2126	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2126
egen AGTIME_2127	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2127
egen AGTIME_2128	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2128
egen AGTIME_2129	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2129
egen AGTIME_2130	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2130
egen AGTIME_2131	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2131
egen AGTIME_2132	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2132
egen AGTIME_2133	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2133
egen AGTIME_2134	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2134
egen AGTIME_2135	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2135
egen AGTIME_2136	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2136
egen AGTIME_2137	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2137
egen AGTIME_2138	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2138
egen AGTIME_2139	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2139
egen AGTIME_2140	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2140
egen AGTIME_2141	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2141
egen AGTIME_2142	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2142
egen AGTIME_2143	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2143
egen AGTIME_2144	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2144
egen AGTIME_2145	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2145
egen AGTIME_2146	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2146
egen AGTIME_2147	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2147
egen AGTIME_2148	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2148
egen AGTIME_2149	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2149
egen AGTIME_2150	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2150
egen AGTIME_2151	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2151
egen AGTIME_2152	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2152
egen AGTIME_2153	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2153
egen AGTIME_2154	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2154
egen AGTIME_2155	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2155
egen AGTIME_2156	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2156
egen AGTIME_2157	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2157
egen AGTIME_2158	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2158
egen AGTIME_2159	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2159
egen AGTIME_2160	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2160
egen AGTIME_2161	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2161
egen AGTIME_2162	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2162
egen AGTIME_2163	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2163
egen AGTIME_2164	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2164
egen AGTIME_2165	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2165
egen AGTIME_2166	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2166
egen AGTIME_2167	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2167
egen AGTIME_2168	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2168
egen AGTIME_2169	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2169
egen AGTIME_2170	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2170
egen AGTIME_2171	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2171
egen AGTIME_2172	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2172
egen AGTIME_2173	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2173
egen AGTIME_2174	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2174
egen AGTIME_2175	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2175
egen AGTIME_2176	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2176
egen AGTIME_2177	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2177
egen AGTIME_2178	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2178
egen AGTIME_2179	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2179
egen AGTIME_2180	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2180
egen AGTIME_2181	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2181
egen AGTIME_2182	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2182
egen AGTIME_2183	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2183
egen AGTIME_2184	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2184
egen AGTIME_2185	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2185
egen AGTIME_2186	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2186
egen AGTIME_2187	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2187
egen AGTIME_2188	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2188
egen AGTIME_2189	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2189
egen AGTIME_2190	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2190
egen AGTIME_2191	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2191
egen AGTIME_2192	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2192
egen AGTIME_2193	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2193
egen AGTIME_2194	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2194
egen AGTIME_2195	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2195
egen AGTIME_2196	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2196
egen AGTIME_2197	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2197
egen AGTIME_2198	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2198
egen AGTIME_2199	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2199
egen AGTIME_2200	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2200
egen AGTIME_2201	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2201
egen AGTIME_2202	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2202
egen AGTIME_2203	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2203
egen AGTIME_2204	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2204
egen AGTIME_2205	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2205
egen AGTIME_2206	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2206
egen AGTIME_2207	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2207
egen AGTIME_2208	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2208
egen AGTIME_2209	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2209
egen AGTIME_2210	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2210
egen AGTIME_2211	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2211
egen AGTIME_2212	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2212
egen AGTIME_2213	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2213
egen AGTIME_2214	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2214
egen AGTIME_2215	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2215
egen AGTIME_2216	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2216
egen AGTIME_2217	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2217
egen AGTIME_2218	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2218
egen AGTIME_2219	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2219
egen AGTIME_2220	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2220
egen AGTIME_2221	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2221
egen AGTIME_2222	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2222
egen AGTIME_2223	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2223
egen AGTIME_2224	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2224
egen AGTIME_2225	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2225
egen AGTIME_2226	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2226
egen AGTIME_2227	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2227
egen AGTIME_2228	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2228
egen AGTIME_2229	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2229
egen AGTIME_2230	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2230
egen AGTIME_2231	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2231
egen AGTIME_2232	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2232
egen AGTIME_2233	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2233
egen AGTIME_2234	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2234
egen AGTIME_2235	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2235
egen AGTIME_2236	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2236
egen AGTIME_2237	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2237
egen AGTIME_2238	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2238
egen AGTIME_2239	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2239
egen AGTIME_2240	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2240
egen AGTIME_2241	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2241
egen AGTIME_2242	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2242
egen AGTIME_2243	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2243
egen AGTIME_2244	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2244
egen AGTIME_2245	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2245
egen AGTIME_2246	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2246
egen AGTIME_2247	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2247
egen AGTIME_2248	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2248
egen AGTIME_2249	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2249
egen AGTIME_2250	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2250
egen AGTIME_2251	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2251
egen AGTIME_2252	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2252
egen AGTIME_2253	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2253
egen AGTIME_2254	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2254
egen AGTIME_2255	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2255
egen AGTIME_2256	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2256
egen AGTIME_2257	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2257
egen AGTIME_2258	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2258
egen AGTIME_2259	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2259
egen AGTIME_2260	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2260
egen AGTIME_2261	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2261
egen AGTIME_2262	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2262
egen AGTIME_2263	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2263
egen AGTIME_2264	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2264
egen AGTIME_2265	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2265
egen AGTIME_2266	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2266
egen AGTIME_2267	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2267
egen AGTIME_2268	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2268
egen AGTIME_2269	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2269
egen AGTIME_2270	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2270
egen AGTIME_2271	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2271
egen AGTIME_2272	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2272
egen AGTIME_2273	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2273
egen AGTIME_2274	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2274
egen AGTIME_2275	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2275
egen AGTIME_2276	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2276
egen AGTIME_2277	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2277
egen AGTIME_2278	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2278
egen AGTIME_2279	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2279
egen AGTIME_2280	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2280
egen AGTIME_2281	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2281
egen AGTIME_2282	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2282
egen AGTIME_2283	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2283
egen AGTIME_2284	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2284
egen AGTIME_2285	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2285
egen AGTIME_2286	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2286
egen AGTIME_2287	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2287
egen AGTIME_2288	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2288
egen AGTIME_2289	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2289
egen AGTIME_2290	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2290
egen AGTIME_2291	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2291
egen AGTIME_2292	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2292
egen AGTIME_2293	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2293
egen AGTIME_2294	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2294
egen AGTIME_2295	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2295
egen AGTIME_2296	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2296
egen AGTIME_2297	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2297
egen AGTIME_2298	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2298
egen AGTIME_2299	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2299
egen AGTIME_2300	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2300
egen AGTIME_2301	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2301
egen AGTIME_2302	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2302
egen AGTIME_2303	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2303
egen AGTIME_2304	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2304
egen AGTIME_2305	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2305
egen AGTIME_2306	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2306
egen AGTIME_2307	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2307
egen AGTIME_2308	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2308
egen AGTIME_2309	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2309
egen AGTIME_2310	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2310
egen AGTIME_2311	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2311
egen AGTIME_2312	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2312
egen AGTIME_2313	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2313
egen AGTIME_2314	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2314
egen AGTIME_2315	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2315
egen AGTIME_2316	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2316
egen AGTIME_2317	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2317
egen AGTIME_2318	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2318
egen AGTIME_2319	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2319
egen AGTIME_2320	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2320
egen AGTIME_2321	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2321
egen AGTIME_2322	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2322
egen AGTIME_2323	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2323
egen AGTIME_2324	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2324
egen AGTIME_2325	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2325
egen AGTIME_2326	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2326
egen AGTIME_2327	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2327
egen AGTIME_2328	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2328
egen AGTIME_2329	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2329
egen AGTIME_2330	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2330
egen AGTIME_2331	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2331
egen AGTIME_2332	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2332
egen AGTIME_2333	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2333
egen AGTIME_2334	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2334
egen AGTIME_2335	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2335
egen AGTIME_2336	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2336
egen AGTIME_2337	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2337
egen AGTIME_2338	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2338
egen AGTIME_2339	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2339
egen AGTIME_2340	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2340
egen AGTIME_2341	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2341
egen AGTIME_2342	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2342
egen AGTIME_2343	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2343
egen AGTIME_2344	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2344
egen AGTIME_2345	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2345
egen AGTIME_2346	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2346
egen AGTIME_2347	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2347
egen AGTIME_2348	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2348
egen AGTIME_2349	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2349
egen AGTIME_2350	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2350
egen AGTIME_2351	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2351
egen AGTIME_2352	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2352
egen AGTIME_2353	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2353
egen AGTIME_2354	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2354
egen AGTIME_2355	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2355
egen AGTIME_2356	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2356
egen AGTIME_2357	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2357
egen AGTIME_2358	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2358
egen AGTIME_2359	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2359
egen AGTIME_2360	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2360
egen AGTIME_2361	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2361
egen AGTIME_2362	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2362
egen AGTIME_2363	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2363
egen AGTIME_2364	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2364
egen AGTIME_2365	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2365
egen AGTIME_2366	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2366
egen AGTIME_2367	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2367
egen AGTIME_2368	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2368
egen AGTIME_2369	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2369
egen AGTIME_2370	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2370
egen AGTIME_2371	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2371
egen AGTIME_2372	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2372
egen AGTIME_2373	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2373
egen AGTIME_2374	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2374
egen AGTIME_2375	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2375
egen AGTIME_2376	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2376
egen AGTIME_2377	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2377
egen AGTIME_2378	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2378
egen AGTIME_2379	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2379
egen AGTIME_2380	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2380
egen AGTIME_2381	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2381
egen AGTIME_2382	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2382
egen AGTIME_2383	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2383
egen AGTIME_2384	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2384
egen AGTIME_2385	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2385
egen AGTIME_2386	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2386
egen AGTIME_2387	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2387
egen AGTIME_2388	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2388
egen AGTIME_2389	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2389
egen AGTIME_2390	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2390
egen AGTIME_2391	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2391
egen AGTIME_2392	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2392
egen AGTIME_2393	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2393
egen AGTIME_2394	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2394
egen AGTIME_2395	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2395
egen AGTIME_2396	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2396
egen AGTIME_2397	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2397
egen AGTIME_2398	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2398
egen AGTIME_2399	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2399
egen AGTIME_2400	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2400
egen AGTIME_2401	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2401
egen AGTIME_2402	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2402
egen AGTIME_2403	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2403
egen AGTIME_2404	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2404
egen AGTIME_2405	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2405
egen AGTIME_2406	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2406
egen AGTIME_2407	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2407
egen AGTIME_2408	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2408
egen AGTIME_2409	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2409
egen AGTIME_2410	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2410
egen AGTIME_2411	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2411
egen AGTIME_2412	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2412
egen AGTIME_2413	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2413
egen AGTIME_2414	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2414
egen AGTIME_2415	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2415
egen AGTIME_2416	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2416
egen AGTIME_2417	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2417
egen AGTIME_2418	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2418
egen AGTIME_2419	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2419
egen AGTIME_2420	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2420
egen AGTIME_2421	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2421
egen AGTIME_2422	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2422
egen AGTIME_2423	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2423
egen AGTIME_2424	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2424
egen AGTIME_2425	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2425
egen AGTIME_2426	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2426
egen AGTIME_2427	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2427
egen AGTIME_2428	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2428
egen AGTIME_2429	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2429
egen AGTIME_2430	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2430
egen AGTIME_2431	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2431
egen AGTIME_2432	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2432
egen AGTIME_2433	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2433
egen AGTIME_2434	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2434
egen AGTIME_2435	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2435
egen AGTIME_2436	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2436
egen AGTIME_2437	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2437
egen AGTIME_2438	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2438
egen AGTIME_2439	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2439
egen AGTIME_2440	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2440
egen AGTIME_2441	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2441
egen AGTIME_2442	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2442
egen AGTIME_2443	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2443
egen AGTIME_2444	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2444
egen AGTIME_2445	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2445
egen AGTIME_2446	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2446
egen AGTIME_2447	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2447
egen AGTIME_2448	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2448
egen AGTIME_2449	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2449
egen AGTIME_2450	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2450
egen AGTIME_2451	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2451
egen AGTIME_2452	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2452
egen AGTIME_2453	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2453
egen AGTIME_2454	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2454
egen AGTIME_2455	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2455
egen AGTIME_2456	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2456
egen AGTIME_2457	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2457
egen AGTIME_2458	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2458
egen AGTIME_2459	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2459
egen AGTIME_2460	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2460
egen AGTIME_2461	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2461
egen AGTIME_2462	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2462
egen AGTIME_2463	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2463
egen AGTIME_2464	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2464
egen AGTIME_2465	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2465
egen AGTIME_2466	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2466
egen AGTIME_2467	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2467
egen AGTIME_2468	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2468
egen AGTIME_2469	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2469
egen AGTIME_2470	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2470
egen AGTIME_2471	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2471
egen AGTIME_2472	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2472
egen AGTIME_2473	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2473
egen AGTIME_2474	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2474
egen AGTIME_2475	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2475
egen AGTIME_2476	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2476
egen AGTIME_2477	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2477
egen AGTIME_2478	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2478
egen AGTIME_2479	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2479
egen AGTIME_2480	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2480
egen AGTIME_2481	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2481
egen AGTIME_2482	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2482
egen AGTIME_2483	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2483
egen AGTIME_2484	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2484
egen AGTIME_2485	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2485
egen AGTIME_2486	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2486
egen AGTIME_2487	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2487
egen AGTIME_2488	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2488
egen AGTIME_2489	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2489
egen AGTIME_2490	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2490
egen AGTIME_2491	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2491
egen AGTIME_2492	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2492
egen AGTIME_2493	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2493
egen AGTIME_2494	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2494
egen AGTIME_2495	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2495
egen AGTIME_2496	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2496
egen AGTIME_2497	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2497
egen AGTIME_2498	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2498
egen AGTIME_2499	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2499
egen AGTIME_2500	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2500

save "C:\NAMED_DIRECTORY\1033_StateQTRData_2014_2023.dta", replace
clear

**REPLACE AND DROP 2001-2500
use "C:\NAMED_DIRECTORY\1033_StateQTRData_2014_2023.dta"
replace AGTIME_ID =	AGTIME_2001	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2002	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2003	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2004	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2005	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2006	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2007	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2008	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2009	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2010	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2011	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2012	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2013	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2014	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2015	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2016	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2017	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2018	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2019	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2020	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2021	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2022	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2023	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2024	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2025	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2026	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2027	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2028	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2029	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2030	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2031	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2032	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2033	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2034	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2035	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2036	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2037	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2038	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2039	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2040	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2041	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2042	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2043	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2044	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2045	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2046	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2047	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2048	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2049	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2050	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2051	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2052	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2053	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2054	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2055	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2056	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2057	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2058	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2059	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2060	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2061	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2062	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2063	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2064	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2065	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2066	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2067	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2068	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2069	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2070	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2071	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2072	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2073	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2074	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2075	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2076	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2077	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2078	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2079	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2080	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2081	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2082	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2083	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2084	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2085	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2086	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2087	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2088	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2089	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2090	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2091	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2092	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2093	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2094	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2095	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2096	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2097	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2098	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2099	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2100	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2101	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2102	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2103	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2104	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2105	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2106	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2107	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2108	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2109	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2110	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2111	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2112	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2113	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2114	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2115	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2116	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2117	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2118	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2119	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2120	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2121	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2122	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2123	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2124	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2125	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2126	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2127	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2128	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2129	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2130	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2131	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2132	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2133	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2134	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2135	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2136	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2137	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2138	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2139	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2140	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2141	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2142	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2143	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2144	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2145	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2146	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2147	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2148	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2149	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2150	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2151	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2152	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2153	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2154	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2155	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2156	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2157	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2158	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2159	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2160	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2161	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2162	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2163	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2164	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2165	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2166	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2167	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2168	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2169	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2170	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2171	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2172	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2173	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2174	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2175	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2176	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2177	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2178	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2179	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2180	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2181	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2182	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2183	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2184	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2185	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2186	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2187	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2188	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2189	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2190	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2191	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2192	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2193	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2194	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2195	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2196	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2197	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2198	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2199	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2200	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2201	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2202	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2203	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2204	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2205	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2206	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2207	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2208	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2209	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2210	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2211	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2212	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2213	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2214	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2215	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2216	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2217	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2218	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2219	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2220	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2221	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2222	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2223	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2224	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2225	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2226	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2227	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2228	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2229	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2230	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2231	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2232	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2233	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2234	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2235	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2236	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2237	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2238	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2239	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2240	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2241	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2242	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2243	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2244	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2245	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2246	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2247	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2248	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2249	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2250	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2251	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2252	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2253	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2254	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2255	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2256	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2257	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2258	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2259	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2260	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2261	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2262	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2263	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2264	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2265	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2266	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2267	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2268	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2269	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2270	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2271	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2272	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2273	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2274	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2275	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2276	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2277	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2278	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2279	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2280	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2281	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2282	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2283	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2284	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2285	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2286	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2287	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2288	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2289	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2290	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2291	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2292	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2293	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2294	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2295	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2296	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2297	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2298	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2299	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2300	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2301	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2302	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2303	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2304	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2305	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2306	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2307	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2308	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2309	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2310	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2311	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2312	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2313	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2314	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2315	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2316	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2317	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2318	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2319	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2320	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2321	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2322	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2323	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2324	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2325	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2326	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2327	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2328	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2329	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2330	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2331	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2332	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2333	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2334	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2335	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2336	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2337	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2338	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2339	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2340	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2341	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2342	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2343	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2344	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2345	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2346	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2347	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2348	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2349	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2350	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2351	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2352	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2353	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2354	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2355	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2356	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2357	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2358	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2359	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2360	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2361	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2362	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2363	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2364	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2365	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2366	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2367	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2368	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2369	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2370	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2371	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2372	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2373	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2374	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2375	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2376	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2377	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2378	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2379	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2380	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2381	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2382	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2383	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2384	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2385	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2386	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2387	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2388	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2389	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2390	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2391	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2392	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2393	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2394	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2395	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2396	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2397	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2398	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2399	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2400	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2401	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2402	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2403	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2404	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2405	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2406	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2407	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2408	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2409	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2410	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2411	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2412	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2413	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2414	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2415	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2416	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2417	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2418	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2419	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2420	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2421	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2422	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2423	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2424	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2425	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2426	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2427	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2428	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2429	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2430	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2431	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2432	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2433	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2434	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2435	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2436	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2437	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2438	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2439	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2440	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2441	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2442	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2443	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2444	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2445	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2446	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2447	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2448	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2449	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2450	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2451	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2452	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2453	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2454	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2455	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2456	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2457	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2458	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2459	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2460	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2461	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2462	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2463	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2464	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2465	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2466	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2467	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2468	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2469	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2470	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2471	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2472	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2473	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2474	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2475	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2476	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2477	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2478	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2479	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2480	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2481	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2482	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2483	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2484	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2485	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2486	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2487	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2488	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2489	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2490	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2491	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2492	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2493	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2494	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2495	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2496	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2497	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2498	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2499	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2500	if AGTIME_ID == .

drop AGTIME_2001-AGTIME_2500

save "C:\NAMED_DIRECTORY\1033_StateQTRData_2014_2023.dta", replace
clear

**VARIABLE BLOCK 2501-3000
use "C:\NAMED_DIRECTORY\1033_StateQTRData_2014_2023.dta"
egen AGTIME_2501	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2501
egen AGTIME_2502	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2502
egen AGTIME_2503	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2503
egen AGTIME_2504	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2504
egen AGTIME_2505	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2505
egen AGTIME_2506	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2506
egen AGTIME_2507	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2507
egen AGTIME_2508	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2508
egen AGTIME_2509	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2509
egen AGTIME_2510	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2510
egen AGTIME_2511	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2511
egen AGTIME_2512	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2512
egen AGTIME_2513	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2513
egen AGTIME_2514	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2514
egen AGTIME_2515	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2515
egen AGTIME_2516	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2516
egen AGTIME_2517	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2517
egen AGTIME_2518	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2518
egen AGTIME_2519	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2519
egen AGTIME_2520	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2520
egen AGTIME_2521	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2521
egen AGTIME_2522	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2522
egen AGTIME_2523	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2523
egen AGTIME_2524	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2524
egen AGTIME_2525	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2525
egen AGTIME_2526	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2526
egen AGTIME_2527	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2527
egen AGTIME_2528	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2528
egen AGTIME_2529	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2529
egen AGTIME_2530	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2530
egen AGTIME_2531	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2531
egen AGTIME_2532	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2532
egen AGTIME_2533	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2533
egen AGTIME_2534	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2534
egen AGTIME_2535	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2535
egen AGTIME_2536	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2536
egen AGTIME_2537	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2537
egen AGTIME_2538	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2538
egen AGTIME_2539	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2539
egen AGTIME_2540	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2540
egen AGTIME_2541	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2541
egen AGTIME_2542	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2542
egen AGTIME_2543	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2543
egen AGTIME_2544	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2544
egen AGTIME_2545	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2545
egen AGTIME_2546	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2546
egen AGTIME_2547	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2547
egen AGTIME_2548	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2548
egen AGTIME_2549	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2549
egen AGTIME_2550	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2550
egen AGTIME_2551	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2551
egen AGTIME_2552	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2552
egen AGTIME_2553	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2553
egen AGTIME_2554	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2554
egen AGTIME_2555	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2555
egen AGTIME_2556	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2556
egen AGTIME_2557	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2557
egen AGTIME_2558	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2558
egen AGTIME_2559	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2559
egen AGTIME_2560	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2560
egen AGTIME_2561	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2561
egen AGTIME_2562	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2562
egen AGTIME_2563	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2563
egen AGTIME_2564	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2564
egen AGTIME_2565	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2565
egen AGTIME_2566	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2566
egen AGTIME_2567	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2567
egen AGTIME_2568	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2568
egen AGTIME_2569	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2569
egen AGTIME_2570	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2570
egen AGTIME_2571	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2571
egen AGTIME_2572	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2572
egen AGTIME_2573	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2573
egen AGTIME_2574	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2574
egen AGTIME_2575	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2575
egen AGTIME_2576	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2576
egen AGTIME_2577	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2577
egen AGTIME_2578	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2578
egen AGTIME_2579	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2579
egen AGTIME_2580	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2580
egen AGTIME_2581	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2581
egen AGTIME_2582	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2582
egen AGTIME_2583	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2583
egen AGTIME_2584	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2584
egen AGTIME_2585	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2585
egen AGTIME_2586	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2586
egen AGTIME_2587	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2587
egen AGTIME_2588	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2588
egen AGTIME_2589	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2589
egen AGTIME_2590	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2590
egen AGTIME_2591	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2591
egen AGTIME_2592	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2592
egen AGTIME_2593	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2593
egen AGTIME_2594	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2594
egen AGTIME_2595	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2595
egen AGTIME_2596	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2596
egen AGTIME_2597	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2597
egen AGTIME_2598	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2598
egen AGTIME_2599	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2599
egen AGTIME_2600	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2600
egen AGTIME_2601	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2601
egen AGTIME_2602	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2602
egen AGTIME_2603	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2603
egen AGTIME_2604	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2604
egen AGTIME_2605	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2605
egen AGTIME_2606	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2606
egen AGTIME_2607	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2607
egen AGTIME_2608	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2608
egen AGTIME_2609	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2609
egen AGTIME_2610	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2610
egen AGTIME_2611	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2611
egen AGTIME_2612	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2612
egen AGTIME_2613	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2613
egen AGTIME_2614	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2614
egen AGTIME_2615	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2615
egen AGTIME_2616	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2616
egen AGTIME_2617	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2617
egen AGTIME_2618	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2618
egen AGTIME_2619	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2619
egen AGTIME_2620	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2620
egen AGTIME_2621	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2621
egen AGTIME_2622	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2622
egen AGTIME_2623	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2623
egen AGTIME_2624	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2624
egen AGTIME_2625	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2625
egen AGTIME_2626	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2626
egen AGTIME_2627	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2627
egen AGTIME_2628	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2628
egen AGTIME_2629	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2629
egen AGTIME_2630	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2630
egen AGTIME_2631	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2631
egen AGTIME_2632	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2632
egen AGTIME_2633	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2633
egen AGTIME_2634	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2634
egen AGTIME_2635	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2635
egen AGTIME_2636	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2636
egen AGTIME_2637	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2637
egen AGTIME_2638	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2638
egen AGTIME_2639	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2639
egen AGTIME_2640	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2640
egen AGTIME_2641	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2641
egen AGTIME_2642	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2642
egen AGTIME_2643	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2643
egen AGTIME_2644	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2644
egen AGTIME_2645	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2645
egen AGTIME_2646	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2646
egen AGTIME_2647	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2647
egen AGTIME_2648	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2648
egen AGTIME_2649	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2649
egen AGTIME_2650	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2650
egen AGTIME_2651	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2651
egen AGTIME_2652	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2652
egen AGTIME_2653	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2653
egen AGTIME_2654	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2654
egen AGTIME_2655	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2655
egen AGTIME_2656	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2656
egen AGTIME_2657	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2657
egen AGTIME_2658	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2658
egen AGTIME_2659	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2659
egen AGTIME_2660	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2660
egen AGTIME_2661	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2661
egen AGTIME_2662	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2662
egen AGTIME_2663	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2663
egen AGTIME_2664	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2664
egen AGTIME_2665	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2665
egen AGTIME_2666	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2666
egen AGTIME_2667	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2667
egen AGTIME_2668	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2668
egen AGTIME_2669	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2669
egen AGTIME_2670	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2670
egen AGTIME_2671	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2671
egen AGTIME_2672	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2672
egen AGTIME_2673	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2673
egen AGTIME_2674	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2674
egen AGTIME_2675	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2675
egen AGTIME_2676	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2676
egen AGTIME_2677	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2677
egen AGTIME_2678	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2678
egen AGTIME_2679	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2679
egen AGTIME_2680	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2680
egen AGTIME_2681	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2681
egen AGTIME_2682	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2682
egen AGTIME_2683	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2683
egen AGTIME_2684	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2684
egen AGTIME_2685	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2685
egen AGTIME_2686	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2686
egen AGTIME_2687	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2687
egen AGTIME_2688	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2688
egen AGTIME_2689	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2689
egen AGTIME_2690	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2690
egen AGTIME_2691	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2691
egen AGTIME_2692	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2692
egen AGTIME_2693	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2693
egen AGTIME_2694	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2694
egen AGTIME_2695	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2695
egen AGTIME_2696	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2696
egen AGTIME_2697	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2697
egen AGTIME_2698	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2698
egen AGTIME_2699	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2699
egen AGTIME_2700	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2700
egen AGTIME_2701	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2701
egen AGTIME_2702	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2702
egen AGTIME_2703	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2703
egen AGTIME_2704	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2704
egen AGTIME_2705	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2705
egen AGTIME_2706	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2706
egen AGTIME_2707	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2707
egen AGTIME_2708	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2708
egen AGTIME_2709	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2709
egen AGTIME_2710	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2710
egen AGTIME_2711	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2711
egen AGTIME_2712	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2712
egen AGTIME_2713	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2713
egen AGTIME_2714	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2714
egen AGTIME_2715	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2715
egen AGTIME_2716	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2716
egen AGTIME_2717	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2717
egen AGTIME_2718	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2718
egen AGTIME_2719	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2719
egen AGTIME_2720	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2720
egen AGTIME_2721	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2721
egen AGTIME_2722	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2722
egen AGTIME_2723	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2723
egen AGTIME_2724	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2724
egen AGTIME_2725	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2725
egen AGTIME_2726	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2726
egen AGTIME_2727	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2727
egen AGTIME_2728	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2728
egen AGTIME_2729	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2729
egen AGTIME_2730	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2730
egen AGTIME_2731	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2731
egen AGTIME_2732	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2732
egen AGTIME_2733	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2733
egen AGTIME_2734	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2734
egen AGTIME_2735	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2735
egen AGTIME_2736	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2736
egen AGTIME_2737	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2737
egen AGTIME_2738	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2738
egen AGTIME_2739	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2739
egen AGTIME_2740	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2740
egen AGTIME_2741	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2741
egen AGTIME_2742	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2742
egen AGTIME_2743	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2743
egen AGTIME_2744	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2744
egen AGTIME_2745	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2745
egen AGTIME_2746	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2746
egen AGTIME_2747	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2747
egen AGTIME_2748	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2748
egen AGTIME_2749	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2749
egen AGTIME_2750	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2750
egen AGTIME_2751	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2751
egen AGTIME_2752	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2752
egen AGTIME_2753	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2753
egen AGTIME_2754	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2754
egen AGTIME_2755	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2755
egen AGTIME_2756	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2756
egen AGTIME_2757	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2757
egen AGTIME_2758	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2758
egen AGTIME_2759	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2759
egen AGTIME_2760	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2760
egen AGTIME_2761	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2761
egen AGTIME_2762	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2762
egen AGTIME_2763	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2763
egen AGTIME_2764	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2764
egen AGTIME_2765	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2765
egen AGTIME_2766	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2766
egen AGTIME_2767	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2767
egen AGTIME_2768	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2768
egen AGTIME_2769	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2769
egen AGTIME_2770	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2770
egen AGTIME_2771	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2771
egen AGTIME_2772	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2772
egen AGTIME_2773	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2773
egen AGTIME_2774	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2774
egen AGTIME_2775	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2775
egen AGTIME_2776	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2776
egen AGTIME_2777	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2777
egen AGTIME_2778	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2778
egen AGTIME_2779	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2779
egen AGTIME_2780	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2780
egen AGTIME_2781	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2781
egen AGTIME_2782	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2782
egen AGTIME_2783	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2783
egen AGTIME_2784	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2784
egen AGTIME_2785	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2785
egen AGTIME_2786	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2786
egen AGTIME_2787	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2787
egen AGTIME_2788	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2788
egen AGTIME_2789	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2789
egen AGTIME_2790	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2790
egen AGTIME_2791	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2791
egen AGTIME_2792	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2792
egen AGTIME_2793	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2793
egen AGTIME_2794	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2794
egen AGTIME_2795	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2795
egen AGTIME_2796	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2796
egen AGTIME_2797	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2797
egen AGTIME_2798	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2798
egen AGTIME_2799	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2799
egen AGTIME_2800	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2800
egen AGTIME_2801	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2801
egen AGTIME_2802	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2802
egen AGTIME_2803	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2803
egen AGTIME_2804	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2804
egen AGTIME_2805	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2805
egen AGTIME_2806	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2806
egen AGTIME_2807	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2807
egen AGTIME_2808	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2808
egen AGTIME_2809	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2809
egen AGTIME_2810	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2810
egen AGTIME_2811	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2811
egen AGTIME_2812	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2812
egen AGTIME_2813	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2813
egen AGTIME_2814	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2814
egen AGTIME_2815	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2815
egen AGTIME_2816	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2816
egen AGTIME_2817	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2817
egen AGTIME_2818	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2818
egen AGTIME_2819	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2819
egen AGTIME_2820	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2820
egen AGTIME_2821	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2821
egen AGTIME_2822	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2822
egen AGTIME_2823	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2823
egen AGTIME_2824	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2824
egen AGTIME_2825	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2825
egen AGTIME_2826	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2826
egen AGTIME_2827	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2827
egen AGTIME_2828	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2828
egen AGTIME_2829	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2829
egen AGTIME_2830	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2830
egen AGTIME_2831	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2831
egen AGTIME_2832	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2832
egen AGTIME_2833	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2833
egen AGTIME_2834	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2834
egen AGTIME_2835	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2835
egen AGTIME_2836	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2836
egen AGTIME_2837	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2837
egen AGTIME_2838	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2838
egen AGTIME_2839	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2839
egen AGTIME_2840	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2840
egen AGTIME_2841	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2841
egen AGTIME_2842	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2842
egen AGTIME_2843	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2843
egen AGTIME_2844	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2844
egen AGTIME_2845	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2845
egen AGTIME_2846	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2846
egen AGTIME_2847	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2847
egen AGTIME_2848	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2848
egen AGTIME_2849	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2849
egen AGTIME_2850	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2850
egen AGTIME_2851	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2851
egen AGTIME_2852	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2852
egen AGTIME_2853	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2853
egen AGTIME_2854	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2854
egen AGTIME_2855	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2855
egen AGTIME_2856	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2856
egen AGTIME_2857	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2857
egen AGTIME_2858	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2858
egen AGTIME_2859	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2859
egen AGTIME_2860	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2860
egen AGTIME_2861	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2861
egen AGTIME_2862	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2862
egen AGTIME_2863	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2863
egen AGTIME_2864	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2864
egen AGTIME_2865	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2865
egen AGTIME_2866	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2866
egen AGTIME_2867	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2867
egen AGTIME_2868	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2868
egen AGTIME_2869	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2869
egen AGTIME_2870	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2870
egen AGTIME_2871	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2871
egen AGTIME_2872	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2872
egen AGTIME_2873	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2873
egen AGTIME_2874	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2874
egen AGTIME_2875	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2875
egen AGTIME_2876	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2876
egen AGTIME_2877	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2877
egen AGTIME_2878	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2878
egen AGTIME_2879	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2879
egen AGTIME_2880	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2880
egen AGTIME_2881	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2881
egen AGTIME_2882	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2882
egen AGTIME_2883	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2883
egen AGTIME_2884	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2884
egen AGTIME_2885	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2885
egen AGTIME_2886	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2886
egen AGTIME_2887	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2887
egen AGTIME_2888	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2888
egen AGTIME_2889	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2889
egen AGTIME_2890	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2890
egen AGTIME_2891	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2891
egen AGTIME_2892	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2892
egen AGTIME_2893	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2893
egen AGTIME_2894	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2894
egen AGTIME_2895	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2895
egen AGTIME_2896	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2896
egen AGTIME_2897	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2897
egen AGTIME_2898	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2898
egen AGTIME_2899	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2899
egen AGTIME_2900	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2900
egen AGTIME_2901	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2901
egen AGTIME_2902	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2902
egen AGTIME_2903	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2903
egen AGTIME_2904	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2904
egen AGTIME_2905	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2905
egen AGTIME_2906	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2906
egen AGTIME_2907	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2907
egen AGTIME_2908	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2908
egen AGTIME_2909	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2909
egen AGTIME_2910	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2910
egen AGTIME_2911	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2911
egen AGTIME_2912	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2912
egen AGTIME_2913	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2913
egen AGTIME_2914	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2914
egen AGTIME_2915	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2915
egen AGTIME_2916	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2916
egen AGTIME_2917	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2917
egen AGTIME_2918	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2918
egen AGTIME_2919	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2919
egen AGTIME_2920	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2920
egen AGTIME_2921	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2921
egen AGTIME_2922	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2922
egen AGTIME_2923	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2923
egen AGTIME_2924	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2924
egen AGTIME_2925	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2925
egen AGTIME_2926	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2926
egen AGTIME_2927	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2927
egen AGTIME_2928	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2928
egen AGTIME_2929	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2929
egen AGTIME_2930	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2930
egen AGTIME_2931	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2931
egen AGTIME_2932	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2932
egen AGTIME_2933	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2933
egen AGTIME_2934	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2934
egen AGTIME_2935	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2935
egen AGTIME_2936	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2936
egen AGTIME_2937	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2937
egen AGTIME_2938	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2938
egen AGTIME_2939	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2939
egen AGTIME_2940	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2940
egen AGTIME_2941	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2941
egen AGTIME_2942	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2942
egen AGTIME_2943	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2943
egen AGTIME_2944	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2944
egen AGTIME_2945	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2945
egen AGTIME_2946	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2946
egen AGTIME_2947	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2947
egen AGTIME_2948	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2948
egen AGTIME_2949	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2949
egen AGTIME_2950	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2950
egen AGTIME_2951	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2951
egen AGTIME_2952	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2952
egen AGTIME_2953	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2953
egen AGTIME_2954	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2954
egen AGTIME_2955	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2955
egen AGTIME_2956	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2956
egen AGTIME_2957	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2957
egen AGTIME_2958	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2958
egen AGTIME_2959	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2959
egen AGTIME_2960	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2960
egen AGTIME_2961	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2961
egen AGTIME_2962	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2962
egen AGTIME_2963	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2963
egen AGTIME_2964	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2964
egen AGTIME_2965	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2965
egen AGTIME_2966	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2966
egen AGTIME_2967	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2967
egen AGTIME_2968	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2968
egen AGTIME_2969	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2969
egen AGTIME_2970	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2970
egen AGTIME_2971	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2971
egen AGTIME_2972	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2972
egen AGTIME_2973	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2973
egen AGTIME_2974	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2974
egen AGTIME_2975	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2975
egen AGTIME_2976	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2976
egen AGTIME_2977	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2977
egen AGTIME_2978	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2978
egen AGTIME_2979	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2979
egen AGTIME_2980	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2980
egen AGTIME_2981	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2981
egen AGTIME_2982	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2982
egen AGTIME_2983	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2983
egen AGTIME_2984	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2984
egen AGTIME_2985	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2985
egen AGTIME_2986	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2986
egen AGTIME_2987	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2987
egen AGTIME_2988	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2988
egen AGTIME_2989	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2989
egen AGTIME_2990	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2990
egen AGTIME_2991	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2991
egen AGTIME_2992	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2992
egen AGTIME_2993	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2993
egen AGTIME_2994	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2994
egen AGTIME_2995	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2995
egen AGTIME_2996	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2996
egen AGTIME_2997	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2997
egen AGTIME_2998	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2998
egen AGTIME_2999	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 2999
egen AGTIME_3000	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3000

save "C:\NAMED_DIRECTORY\1033_StateQTRData_2014_2023.dta", replace
clear

**REPLACE AND DROP 2501-3000
use "C:\NAMED_DIRECTORY\1033_StateQTRData_2014_2023.dta"
replace AGTIME_ID =	AGTIME_2501	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2502	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2503	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2504	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2505	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2506	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2507	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2508	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2509	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2510	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2511	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2512	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2513	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2514	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2515	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2516	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2517	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2518	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2519	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2520	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2521	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2522	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2523	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2524	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2525	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2526	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2527	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2528	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2529	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2530	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2531	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2532	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2533	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2534	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2535	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2536	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2537	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2538	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2539	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2540	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2541	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2542	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2543	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2544	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2545	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2546	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2547	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2548	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2549	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2550	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2551	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2552	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2553	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2554	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2555	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2556	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2557	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2558	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2559	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2560	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2561	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2562	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2563	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2564	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2565	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2566	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2567	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2568	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2569	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2570	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2571	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2572	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2573	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2574	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2575	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2576	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2577	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2578	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2579	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2580	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2581	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2582	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2583	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2584	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2585	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2586	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2587	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2588	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2589	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2590	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2591	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2592	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2593	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2594	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2595	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2596	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2597	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2598	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2599	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2600	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2601	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2602	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2603	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2604	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2605	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2606	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2607	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2608	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2609	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2610	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2611	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2612	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2613	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2614	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2615	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2616	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2617	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2618	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2619	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2620	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2621	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2622	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2623	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2624	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2625	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2626	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2627	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2628	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2629	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2630	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2631	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2632	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2633	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2634	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2635	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2636	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2637	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2638	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2639	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2640	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2641	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2642	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2643	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2644	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2645	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2646	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2647	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2648	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2649	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2650	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2651	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2652	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2653	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2654	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2655	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2656	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2657	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2658	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2659	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2660	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2661	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2662	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2663	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2664	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2665	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2666	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2667	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2668	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2669	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2670	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2671	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2672	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2673	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2674	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2675	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2676	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2677	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2678	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2679	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2680	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2681	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2682	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2683	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2684	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2685	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2686	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2687	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2688	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2689	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2690	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2691	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2692	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2693	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2694	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2695	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2696	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2697	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2698	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2699	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2700	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2701	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2702	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2703	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2704	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2705	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2706	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2707	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2708	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2709	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2710	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2711	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2712	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2713	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2714	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2715	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2716	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2717	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2718	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2719	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2720	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2721	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2722	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2723	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2724	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2725	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2726	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2727	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2728	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2729	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2730	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2731	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2732	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2733	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2734	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2735	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2736	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2737	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2738	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2739	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2740	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2741	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2742	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2743	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2744	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2745	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2746	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2747	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2748	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2749	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2750	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2751	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2752	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2753	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2754	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2755	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2756	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2757	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2758	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2759	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2760	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2761	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2762	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2763	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2764	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2765	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2766	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2767	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2768	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2769	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2770	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2771	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2772	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2773	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2774	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2775	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2776	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2777	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2778	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2779	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2780	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2781	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2782	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2783	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2784	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2785	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2786	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2787	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2788	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2789	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2790	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2791	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2792	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2793	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2794	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2795	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2796	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2797	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2798	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2799	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2800	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2801	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2802	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2803	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2804	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2805	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2806	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2807	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2808	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2809	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2810	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2811	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2812	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2813	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2814	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2815	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2816	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2817	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2818	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2819	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2820	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2821	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2822	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2823	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2824	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2825	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2826	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2827	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2828	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2829	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2830	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2831	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2832	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2833	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2834	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2835	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2836	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2837	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2838	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2839	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2840	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2841	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2842	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2843	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2844	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2845	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2846	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2847	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2848	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2849	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2850	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2851	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2852	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2853	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2854	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2855	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2856	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2857	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2858	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2859	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2860	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2861	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2862	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2863	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2864	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2865	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2866	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2867	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2868	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2869	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2870	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2871	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2872	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2873	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2874	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2875	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2876	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2877	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2878	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2879	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2880	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2881	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2882	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2883	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2884	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2885	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2886	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2887	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2888	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2889	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2890	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2891	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2892	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2893	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2894	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2895	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2896	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2897	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2898	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2899	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2900	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2901	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2902	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2903	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2904	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2905	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2906	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2907	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2908	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2909	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2910	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2911	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2912	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2913	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2914	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2915	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2916	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2917	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2918	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2919	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2920	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2921	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2922	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2923	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2924	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2925	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2926	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2927	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2928	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2929	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2930	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2931	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2932	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2933	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2934	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2935	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2936	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2937	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2938	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2939	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2940	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2941	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2942	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2943	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2944	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2945	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2946	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2947	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2948	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2949	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2950	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2951	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2952	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2953	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2954	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2955	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2956	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2957	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2958	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2959	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2960	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2961	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2962	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2963	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2964	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2965	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2966	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2967	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2968	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2969	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2970	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2971	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2972	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2973	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2974	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2975	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2976	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2977	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2978	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2979	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2980	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2981	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2982	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2983	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2984	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2985	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2986	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2987	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2988	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2989	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2990	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2991	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2992	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2993	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2994	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2995	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2996	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2997	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2998	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_2999	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3000	if AGTIME_ID == .

drop AGTIME_2501-AGTIME_3000

save "C:\NAMED_DIRECTORY\1033_StateQTRData_2014_2023.dta", replace
clear

**VARIABLE BLOCK 3001-3500
use "C:\NAMED_DIRECTORY\1033_StateQTRData_2014_2023.dta"
egen AGTIME_3001	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3001
egen AGTIME_3002	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3002
egen AGTIME_3003	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3003
egen AGTIME_3004	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3004
egen AGTIME_3005	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3005
egen AGTIME_3006	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3006
egen AGTIME_3007	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3007
egen AGTIME_3008	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3008
egen AGTIME_3009	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3009
egen AGTIME_3010	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3010
egen AGTIME_3011	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3011
egen AGTIME_3012	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3012
egen AGTIME_3013	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3013
egen AGTIME_3014	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3014
egen AGTIME_3015	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3015
egen AGTIME_3016	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3016
egen AGTIME_3017	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3017
egen AGTIME_3018	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3018
egen AGTIME_3019	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3019
egen AGTIME_3020	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3020
egen AGTIME_3021	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3021
egen AGTIME_3022	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3022
egen AGTIME_3023	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3023
egen AGTIME_3024	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3024
egen AGTIME_3025	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3025
egen AGTIME_3026	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3026
egen AGTIME_3027	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3027
egen AGTIME_3028	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3028
egen AGTIME_3029	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3029
egen AGTIME_3030	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3030
egen AGTIME_3031	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3031
egen AGTIME_3032	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3032
egen AGTIME_3033	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3033
egen AGTIME_3034	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3034
egen AGTIME_3035	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3035
egen AGTIME_3036	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3036
egen AGTIME_3037	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3037
egen AGTIME_3038	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3038
egen AGTIME_3039	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3039
egen AGTIME_3040	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3040
egen AGTIME_3041	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3041
egen AGTIME_3042	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3042
egen AGTIME_3043	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3043
egen AGTIME_3044	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3044
egen AGTIME_3045	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3045
egen AGTIME_3046	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3046
egen AGTIME_3047	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3047
egen AGTIME_3048	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3048
egen AGTIME_3049	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3049
egen AGTIME_3050	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3050
egen AGTIME_3051	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3051
egen AGTIME_3052	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3052
egen AGTIME_3053	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3053
egen AGTIME_3054	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3054
egen AGTIME_3055	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3055
egen AGTIME_3056	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3056
egen AGTIME_3057	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3057
egen AGTIME_3058	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3058
egen AGTIME_3059	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3059
egen AGTIME_3060	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3060
egen AGTIME_3061	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3061
egen AGTIME_3062	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3062
egen AGTIME_3063	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3063
egen AGTIME_3064	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3064
egen AGTIME_3065	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3065
egen AGTIME_3066	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3066
egen AGTIME_3067	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3067
egen AGTIME_3068	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3068
egen AGTIME_3069	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3069
egen AGTIME_3070	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3070
egen AGTIME_3071	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3071
egen AGTIME_3072	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3072
egen AGTIME_3073	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3073
egen AGTIME_3074	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3074
egen AGTIME_3075	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3075
egen AGTIME_3076	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3076
egen AGTIME_3077	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3077
egen AGTIME_3078	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3078
egen AGTIME_3079	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3079
egen AGTIME_3080	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3080
egen AGTIME_3081	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3081
egen AGTIME_3082	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3082
egen AGTIME_3083	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3083
egen AGTIME_3084	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3084
egen AGTIME_3085	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3085
egen AGTIME_3086	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3086
egen AGTIME_3087	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3087
egen AGTIME_3088	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3088
egen AGTIME_3089	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3089
egen AGTIME_3090	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3090
egen AGTIME_3091	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3091
egen AGTIME_3092	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3092
egen AGTIME_3093	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3093
egen AGTIME_3094	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3094
egen AGTIME_3095	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3095
egen AGTIME_3096	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3096
egen AGTIME_3097	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3097
egen AGTIME_3098	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3098
egen AGTIME_3099	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3099
egen AGTIME_3100	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3100
egen AGTIME_3101	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3101
egen AGTIME_3102	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3102
egen AGTIME_3103	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3103
egen AGTIME_3104	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3104
egen AGTIME_3105	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3105
egen AGTIME_3106	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3106
egen AGTIME_3107	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3107
egen AGTIME_3108	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3108
egen AGTIME_3109	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3109
egen AGTIME_3110	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3110
egen AGTIME_3111	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3111
egen AGTIME_3112	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3112
egen AGTIME_3113	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3113
egen AGTIME_3114	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3114
egen AGTIME_3115	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3115
egen AGTIME_3116	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3116
egen AGTIME_3117	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3117
egen AGTIME_3118	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3118
egen AGTIME_3119	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3119
egen AGTIME_3120	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3120
egen AGTIME_3121	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3121
egen AGTIME_3122	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3122
egen AGTIME_3123	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3123
egen AGTIME_3124	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3124
egen AGTIME_3125	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3125
egen AGTIME_3126	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3126
egen AGTIME_3127	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3127
egen AGTIME_3128	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3128
egen AGTIME_3129	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3129
egen AGTIME_3130	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3130
egen AGTIME_3131	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3131
egen AGTIME_3132	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3132
egen AGTIME_3133	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3133
egen AGTIME_3134	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3134
egen AGTIME_3135	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3135
egen AGTIME_3136	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3136
egen AGTIME_3137	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3137
egen AGTIME_3138	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3138
egen AGTIME_3139	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3139
egen AGTIME_3140	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3140
egen AGTIME_3141	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3141
egen AGTIME_3142	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3142
egen AGTIME_3143	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3143
egen AGTIME_3144	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3144
egen AGTIME_3145	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3145
egen AGTIME_3146	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3146
egen AGTIME_3147	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3147
egen AGTIME_3148	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3148
egen AGTIME_3149	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3149
egen AGTIME_3150	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3150
egen AGTIME_3151	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3151
egen AGTIME_3152	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3152
egen AGTIME_3153	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3153
egen AGTIME_3154	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3154
egen AGTIME_3155	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3155
egen AGTIME_3156	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3156
egen AGTIME_3157	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3157
egen AGTIME_3158	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3158
egen AGTIME_3159	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3159
egen AGTIME_3160	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3160
egen AGTIME_3161	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3161
egen AGTIME_3162	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3162
egen AGTIME_3163	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3163
egen AGTIME_3164	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3164
egen AGTIME_3165	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3165
egen AGTIME_3166	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3166
egen AGTIME_3167	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3167
egen AGTIME_3168	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3168
egen AGTIME_3169	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3169
egen AGTIME_3170	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3170
egen AGTIME_3171	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3171
egen AGTIME_3172	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3172
egen AGTIME_3173	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3173
egen AGTIME_3174	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3174
egen AGTIME_3175	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3175
egen AGTIME_3176	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3176
egen AGTIME_3177	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3177
egen AGTIME_3178	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3178
egen AGTIME_3179	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3179
egen AGTIME_3180	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3180
egen AGTIME_3181	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3181
egen AGTIME_3182	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3182
egen AGTIME_3183	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3183
egen AGTIME_3184	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3184
egen AGTIME_3185	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3185
egen AGTIME_3186	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3186
egen AGTIME_3187	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3187
egen AGTIME_3188	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3188
egen AGTIME_3189	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3189
egen AGTIME_3190	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3190
egen AGTIME_3191	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3191
egen AGTIME_3192	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3192
egen AGTIME_3193	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3193
egen AGTIME_3194	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3194
egen AGTIME_3195	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3195
egen AGTIME_3196	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3196
egen AGTIME_3197	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3197
egen AGTIME_3198	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3198
egen AGTIME_3199	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3199
egen AGTIME_3200	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3200
egen AGTIME_3201	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3201
egen AGTIME_3202	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3202
egen AGTIME_3203	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3203
egen AGTIME_3204	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3204
egen AGTIME_3205	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3205
egen AGTIME_3206	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3206
egen AGTIME_3207	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3207
egen AGTIME_3208	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3208
egen AGTIME_3209	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3209
egen AGTIME_3210	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3210
egen AGTIME_3211	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3211
egen AGTIME_3212	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3212
egen AGTIME_3213	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3213
egen AGTIME_3214	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3214
egen AGTIME_3215	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3215
egen AGTIME_3216	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3216
egen AGTIME_3217	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3217
egen AGTIME_3218	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3218
egen AGTIME_3219	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3219
egen AGTIME_3220	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3220
egen AGTIME_3221	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3221
egen AGTIME_3222	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3222
egen AGTIME_3223	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3223
egen AGTIME_3224	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3224
egen AGTIME_3225	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3225
egen AGTIME_3226	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3226
egen AGTIME_3227	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3227
egen AGTIME_3228	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3228
egen AGTIME_3229	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3229
egen AGTIME_3230	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3230
egen AGTIME_3231	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3231
egen AGTIME_3232	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3232
egen AGTIME_3233	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3233
egen AGTIME_3234	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3234
egen AGTIME_3235	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3235
egen AGTIME_3236	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3236
egen AGTIME_3237	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3237
egen AGTIME_3238	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3238
egen AGTIME_3239	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3239
egen AGTIME_3240	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3240
egen AGTIME_3241	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3241
egen AGTIME_3242	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3242
egen AGTIME_3243	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3243
egen AGTIME_3244	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3244
egen AGTIME_3245	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3245
egen AGTIME_3246	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3246
egen AGTIME_3247	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3247
egen AGTIME_3248	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3248
egen AGTIME_3249	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3249
egen AGTIME_3250	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3250
egen AGTIME_3251	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3251
egen AGTIME_3252	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3252
egen AGTIME_3253	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3253
egen AGTIME_3254	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3254
egen AGTIME_3255	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3255
egen AGTIME_3256	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3256
egen AGTIME_3257	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3257
egen AGTIME_3258	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3258
egen AGTIME_3259	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3259
egen AGTIME_3260	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3260
egen AGTIME_3261	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3261
egen AGTIME_3262	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3262
egen AGTIME_3263	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3263
egen AGTIME_3264	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3264
egen AGTIME_3265	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3265
egen AGTIME_3266	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3266
egen AGTIME_3267	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3267
egen AGTIME_3268	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3268
egen AGTIME_3269	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3269
egen AGTIME_3270	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3270
egen AGTIME_3271	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3271
egen AGTIME_3272	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3272
egen AGTIME_3273	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3273
egen AGTIME_3274	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3274
egen AGTIME_3275	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3275
egen AGTIME_3276	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3276
egen AGTIME_3277	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3277
egen AGTIME_3278	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3278
egen AGTIME_3279	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3279
egen AGTIME_3280	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3280
egen AGTIME_3281	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3281
egen AGTIME_3282	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3282
egen AGTIME_3283	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3283
egen AGTIME_3284	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3284
egen AGTIME_3285	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3285
egen AGTIME_3286	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3286
egen AGTIME_3287	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3287
egen AGTIME_3288	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3288
egen AGTIME_3289	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3289
egen AGTIME_3290	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3290
egen AGTIME_3291	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3291
egen AGTIME_3292	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3292
egen AGTIME_3293	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3293
egen AGTIME_3294	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3294
egen AGTIME_3295	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3295
egen AGTIME_3296	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3296
egen AGTIME_3297	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3297
egen AGTIME_3298	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3298
egen AGTIME_3299	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3299
egen AGTIME_3300	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3300
egen AGTIME_3301	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3301
egen AGTIME_3302	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3302
egen AGTIME_3303	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3303
egen AGTIME_3304	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3304
egen AGTIME_3305	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3305
egen AGTIME_3306	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3306
egen AGTIME_3307	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3307
egen AGTIME_3308	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3308
egen AGTIME_3309	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3309
egen AGTIME_3310	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3310
egen AGTIME_3311	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3311
egen AGTIME_3312	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3312
egen AGTIME_3313	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3313
egen AGTIME_3314	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3314
egen AGTIME_3315	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3315
egen AGTIME_3316	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3316
egen AGTIME_3317	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3317
egen AGTIME_3318	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3318
egen AGTIME_3319	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3319
egen AGTIME_3320	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3320
egen AGTIME_3321	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3321
egen AGTIME_3322	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3322
egen AGTIME_3323	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3323
egen AGTIME_3324	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3324
egen AGTIME_3325	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3325
egen AGTIME_3326	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3326
egen AGTIME_3327	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3327
egen AGTIME_3328	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3328
egen AGTIME_3329	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3329
egen AGTIME_3330	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3330
egen AGTIME_3331	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3331
egen AGTIME_3332	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3332
egen AGTIME_3333	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3333
egen AGTIME_3334	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3334
egen AGTIME_3335	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3335
egen AGTIME_3336	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3336
egen AGTIME_3337	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3337
egen AGTIME_3338	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3338
egen AGTIME_3339	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3339
egen AGTIME_3340	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3340
egen AGTIME_3341	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3341
egen AGTIME_3342	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3342
egen AGTIME_3343	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3343
egen AGTIME_3344	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3344
egen AGTIME_3345	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3345
egen AGTIME_3346	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3346
egen AGTIME_3347	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3347
egen AGTIME_3348	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3348
egen AGTIME_3349	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3349
egen AGTIME_3350	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3350
egen AGTIME_3351	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3351
egen AGTIME_3352	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3352
egen AGTIME_3353	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3353
egen AGTIME_3354	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3354
egen AGTIME_3355	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3355
egen AGTIME_3356	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3356
egen AGTIME_3357	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3357
egen AGTIME_3358	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3358
egen AGTIME_3359	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3359
egen AGTIME_3360	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3360
egen AGTIME_3361	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3361
egen AGTIME_3362	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3362
egen AGTIME_3363	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3363
egen AGTIME_3364	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3364
egen AGTIME_3365	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3365
egen AGTIME_3366	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3366
egen AGTIME_3367	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3367
egen AGTIME_3368	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3368
egen AGTIME_3369	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3369
egen AGTIME_3370	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3370
egen AGTIME_3371	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3371
egen AGTIME_3372	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3372
egen AGTIME_3373	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3373
egen AGTIME_3374	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3374
egen AGTIME_3375	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3375
egen AGTIME_3376	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3376
egen AGTIME_3377	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3377
egen AGTIME_3378	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3378
egen AGTIME_3379	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3379
egen AGTIME_3380	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3380
egen AGTIME_3381	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3381
egen AGTIME_3382	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3382
egen AGTIME_3383	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3383
egen AGTIME_3384	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3384
egen AGTIME_3385	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3385
egen AGTIME_3386	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3386
egen AGTIME_3387	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3387
egen AGTIME_3388	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3388
egen AGTIME_3389	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3389
egen AGTIME_3390	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3390
egen AGTIME_3391	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3391
egen AGTIME_3392	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3392
egen AGTIME_3393	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3393
egen AGTIME_3394	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3394
egen AGTIME_3395	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3395
egen AGTIME_3396	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3396
egen AGTIME_3397	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3397
egen AGTIME_3398	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3398
egen AGTIME_3399	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3399
egen AGTIME_3400	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3400
egen AGTIME_3401	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3401
egen AGTIME_3402	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3402
egen AGTIME_3403	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3403
egen AGTIME_3404	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3404
egen AGTIME_3405	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3405
egen AGTIME_3406	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3406
egen AGTIME_3407	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3407
egen AGTIME_3408	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3408
egen AGTIME_3409	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3409
egen AGTIME_3410	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3410
egen AGTIME_3411	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3411
egen AGTIME_3412	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3412
egen AGTIME_3413	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3413
egen AGTIME_3414	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3414
egen AGTIME_3415	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3415
egen AGTIME_3416	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3416
egen AGTIME_3417	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3417
egen AGTIME_3418	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3418
egen AGTIME_3419	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3419
egen AGTIME_3420	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3420
egen AGTIME_3421	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3421
egen AGTIME_3422	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3422
egen AGTIME_3423	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3423
egen AGTIME_3424	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3424
egen AGTIME_3425	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3425
egen AGTIME_3426	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3426
egen AGTIME_3427	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3427
egen AGTIME_3428	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3428
egen AGTIME_3429	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3429
egen AGTIME_3430	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3430
egen AGTIME_3431	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3431
egen AGTIME_3432	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3432
egen AGTIME_3433	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3433
egen AGTIME_3434	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3434
egen AGTIME_3435	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3435
egen AGTIME_3436	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3436
egen AGTIME_3437	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3437
egen AGTIME_3438	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3438
egen AGTIME_3439	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3439
egen AGTIME_3440	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3440
egen AGTIME_3441	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3441
egen AGTIME_3442	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3442
egen AGTIME_3443	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3443
egen AGTIME_3444	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3444
egen AGTIME_3445	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3445
egen AGTIME_3446	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3446
egen AGTIME_3447	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3447
egen AGTIME_3448	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3448
egen AGTIME_3449	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3449
egen AGTIME_3450	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3450
egen AGTIME_3451	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3451
egen AGTIME_3452	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3452
egen AGTIME_3453	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3453
egen AGTIME_3454	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3454
egen AGTIME_3455	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3455
egen AGTIME_3456	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3456
egen AGTIME_3457	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3457
egen AGTIME_3458	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3458
egen AGTIME_3459	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3459
egen AGTIME_3460	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3460
egen AGTIME_3461	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3461
egen AGTIME_3462	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3462
egen AGTIME_3463	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3463
egen AGTIME_3464	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3464
egen AGTIME_3465	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3465
egen AGTIME_3466	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3466
egen AGTIME_3467	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3467
egen AGTIME_3468	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3468
egen AGTIME_3469	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3469
egen AGTIME_3470	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3470
egen AGTIME_3471	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3471
egen AGTIME_3472	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3472
egen AGTIME_3473	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3473
egen AGTIME_3474	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3474
egen AGTIME_3475	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3475
egen AGTIME_3476	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3476
egen AGTIME_3477	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3477
egen AGTIME_3478	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3478
egen AGTIME_3479	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3479
egen AGTIME_3480	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3480
egen AGTIME_3481	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3481
egen AGTIME_3482	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3482
egen AGTIME_3483	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3483
egen AGTIME_3484	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3484
egen AGTIME_3485	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3485
egen AGTIME_3486	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3486
egen AGTIME_3487	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3487
egen AGTIME_3488	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3488
egen AGTIME_3489	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3489
egen AGTIME_3490	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3490
egen AGTIME_3491	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3491
egen AGTIME_3492	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3492
egen AGTIME_3493	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3493
egen AGTIME_3494	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3494
egen AGTIME_3495	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3495
egen AGTIME_3496	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3496
egen AGTIME_3497	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3497
egen AGTIME_3498	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3498
egen AGTIME_3499	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3499
egen AGTIME_3500	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3500

save "C:\NAMED_DIRECTORY\1033_StateQTRData_2014_2023.dta", replace
clear

**REPLACE AND DROP 3001-3500
use "C:\NAMED_DIRECTORY\1033_StateQTRData_2014_2023.dta"
replace AGTIME_ID =	AGTIME_3001	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3002	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3003	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3004	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3005	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3006	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3007	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3008	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3009	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3010	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3011	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3012	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3013	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3014	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3015	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3016	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3017	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3018	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3019	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3020	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3021	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3022	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3023	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3024	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3025	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3026	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3027	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3028	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3029	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3030	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3031	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3032	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3033	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3034	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3035	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3036	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3037	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3038	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3039	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3040	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3041	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3042	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3043	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3044	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3045	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3046	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3047	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3048	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3049	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3050	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3051	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3052	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3053	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3054	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3055	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3056	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3057	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3058	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3059	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3060	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3061	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3062	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3063	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3064	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3065	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3066	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3067	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3068	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3069	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3070	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3071	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3072	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3073	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3074	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3075	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3076	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3077	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3078	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3079	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3080	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3081	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3082	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3083	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3084	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3085	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3086	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3087	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3088	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3089	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3090	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3091	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3092	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3093	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3094	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3095	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3096	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3097	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3098	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3099	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3100	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3101	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3102	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3103	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3104	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3105	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3106	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3107	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3108	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3109	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3110	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3111	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3112	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3113	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3114	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3115	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3116	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3117	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3118	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3119	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3120	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3121	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3122	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3123	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3124	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3125	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3126	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3127	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3128	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3129	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3130	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3131	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3132	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3133	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3134	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3135	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3136	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3137	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3138	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3139	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3140	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3141	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3142	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3143	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3144	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3145	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3146	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3147	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3148	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3149	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3150	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3151	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3152	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3153	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3154	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3155	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3156	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3157	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3158	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3159	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3160	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3161	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3162	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3163	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3164	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3165	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3166	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3167	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3168	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3169	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3170	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3171	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3172	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3173	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3174	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3175	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3176	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3177	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3178	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3179	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3180	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3181	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3182	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3183	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3184	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3185	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3186	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3187	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3188	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3189	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3190	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3191	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3192	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3193	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3194	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3195	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3196	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3197	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3198	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3199	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3200	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3201	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3202	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3203	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3204	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3205	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3206	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3207	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3208	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3209	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3210	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3211	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3212	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3213	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3214	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3215	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3216	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3217	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3218	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3219	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3220	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3221	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3222	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3223	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3224	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3225	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3226	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3227	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3228	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3229	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3230	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3231	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3232	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3233	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3234	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3235	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3236	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3237	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3238	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3239	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3240	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3241	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3242	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3243	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3244	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3245	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3246	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3247	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3248	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3249	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3250	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3251	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3252	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3253	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3254	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3255	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3256	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3257	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3258	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3259	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3260	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3261	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3262	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3263	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3264	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3265	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3266	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3267	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3268	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3269	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3270	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3271	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3272	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3273	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3274	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3275	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3276	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3277	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3278	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3279	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3280	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3281	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3282	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3283	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3284	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3285	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3286	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3287	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3288	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3289	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3290	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3291	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3292	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3293	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3294	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3295	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3296	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3297	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3298	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3299	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3300	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3301	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3302	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3303	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3304	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3305	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3306	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3307	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3308	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3309	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3310	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3311	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3312	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3313	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3314	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3315	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3316	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3317	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3318	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3319	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3320	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3321	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3322	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3323	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3324	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3325	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3326	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3327	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3328	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3329	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3330	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3331	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3332	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3333	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3334	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3335	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3336	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3337	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3338	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3339	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3340	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3341	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3342	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3343	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3344	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3345	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3346	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3347	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3348	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3349	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3350	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3351	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3352	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3353	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3354	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3355	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3356	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3357	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3358	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3359	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3360	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3361	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3362	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3363	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3364	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3365	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3366	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3367	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3368	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3369	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3370	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3371	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3372	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3373	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3374	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3375	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3376	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3377	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3378	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3379	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3380	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3381	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3382	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3383	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3384	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3385	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3386	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3387	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3388	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3389	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3390	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3391	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3392	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3393	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3394	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3395	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3396	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3397	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3398	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3399	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3400	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3401	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3402	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3403	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3404	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3405	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3406	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3407	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3408	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3409	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3410	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3411	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3412	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3413	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3414	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3415	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3416	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3417	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3418	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3419	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3420	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3421	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3422	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3423	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3424	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3425	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3426	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3427	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3428	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3429	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3430	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3431	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3432	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3433	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3434	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3435	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3436	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3437	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3438	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3439	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3440	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3441	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3442	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3443	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3444	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3445	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3446	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3447	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3448	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3449	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3450	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3451	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3452	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3453	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3454	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3455	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3456	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3457	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3458	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3459	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3460	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3461	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3462	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3463	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3464	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3465	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3466	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3467	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3468	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3469	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3470	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3471	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3472	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3473	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3474	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3475	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3476	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3477	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3478	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3479	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3480	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3481	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3482	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3483	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3484	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3485	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3486	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3487	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3488	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3489	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3490	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3491	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3492	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3493	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3494	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3495	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3496	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3497	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3498	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3499	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3500	if AGTIME_ID == .

drop AGTIME_3001-AGTIME_3500

save "C:\NAMED_DIRECTORY\1033_StateQTRData_2014_2023.dta", replace
clear

**VARIABLE BLOCK 3501-4000
use "C:\NAMED_DIRECTORY\1033_StateQTRData_2014_2023.dta"
egen AGTIME_3501	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3501
egen AGTIME_3502	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3502
egen AGTIME_3503	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3503
egen AGTIME_3504	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3504
egen AGTIME_3505	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3505
egen AGTIME_3506	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3506
egen AGTIME_3507	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3507
egen AGTIME_3508	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3508
egen AGTIME_3509	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3509
egen AGTIME_3510	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3510
egen AGTIME_3511	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3511
egen AGTIME_3512	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3512
egen AGTIME_3513	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3513
egen AGTIME_3514	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3514
egen AGTIME_3515	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3515
egen AGTIME_3516	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3516
egen AGTIME_3517	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3517
egen AGTIME_3518	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3518
egen AGTIME_3519	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3519
egen AGTIME_3520	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3520
egen AGTIME_3521	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3521
egen AGTIME_3522	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3522
egen AGTIME_3523	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3523
egen AGTIME_3524	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3524
egen AGTIME_3525	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3525
egen AGTIME_3526	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3526
egen AGTIME_3527	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3527
egen AGTIME_3528	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3528
egen AGTIME_3529	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3529
egen AGTIME_3530	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3530
egen AGTIME_3531	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3531
egen AGTIME_3532	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3532
egen AGTIME_3533	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3533
egen AGTIME_3534	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3534
egen AGTIME_3535	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3535
egen AGTIME_3536	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3536
egen AGTIME_3537	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3537
egen AGTIME_3538	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3538
egen AGTIME_3539	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3539
egen AGTIME_3540	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3540
egen AGTIME_3541	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3541
egen AGTIME_3542	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3542
egen AGTIME_3543	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3543
egen AGTIME_3544	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3544
egen AGTIME_3545	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3545
egen AGTIME_3546	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3546
egen AGTIME_3547	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3547
egen AGTIME_3548	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3548
egen AGTIME_3549	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3549
egen AGTIME_3550	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3550
egen AGTIME_3551	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3551
egen AGTIME_3552	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3552
egen AGTIME_3553	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3553
egen AGTIME_3554	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3554
egen AGTIME_3555	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3555
egen AGTIME_3556	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3556
egen AGTIME_3557	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3557
egen AGTIME_3558	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3558
egen AGTIME_3559	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3559
egen AGTIME_3560	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3560
egen AGTIME_3561	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3561
egen AGTIME_3562	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3562
egen AGTIME_3563	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3563
egen AGTIME_3564	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3564
egen AGTIME_3565	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3565
egen AGTIME_3566	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3566
egen AGTIME_3567	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3567
egen AGTIME_3568	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3568
egen AGTIME_3569	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3569
egen AGTIME_3570	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3570
egen AGTIME_3571	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3571
egen AGTIME_3572	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3572
egen AGTIME_3573	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3573
egen AGTIME_3574	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3574
egen AGTIME_3575	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3575
egen AGTIME_3576	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3576
egen AGTIME_3577	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3577
egen AGTIME_3578	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3578
egen AGTIME_3579	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3579
egen AGTIME_3580	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3580
egen AGTIME_3581	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3581
egen AGTIME_3582	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3582
egen AGTIME_3583	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3583
egen AGTIME_3584	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3584
egen AGTIME_3585	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3585
egen AGTIME_3586	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3586
egen AGTIME_3587	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3587
egen AGTIME_3588	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3588
egen AGTIME_3589	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3589
egen AGTIME_3590	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3590
egen AGTIME_3591	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3591
egen AGTIME_3592	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3592
egen AGTIME_3593	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3593
egen AGTIME_3594	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3594
egen AGTIME_3595	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3595
egen AGTIME_3596	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3596
egen AGTIME_3597	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3597
egen AGTIME_3598	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3598
egen AGTIME_3599	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3599
egen AGTIME_3600	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3600
egen AGTIME_3601	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3601
egen AGTIME_3602	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3602
egen AGTIME_3603	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3603
egen AGTIME_3604	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3604
egen AGTIME_3605	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3605
egen AGTIME_3606	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3606
egen AGTIME_3607	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3607
egen AGTIME_3608	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3608
egen AGTIME_3609	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3609
egen AGTIME_3610	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3610
egen AGTIME_3611	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3611
egen AGTIME_3612	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3612
egen AGTIME_3613	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3613
egen AGTIME_3614	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3614
egen AGTIME_3615	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3615
egen AGTIME_3616	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3616
egen AGTIME_3617	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3617
egen AGTIME_3618	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3618
egen AGTIME_3619	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3619
egen AGTIME_3620	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3620
egen AGTIME_3621	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3621
egen AGTIME_3622	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3622
egen AGTIME_3623	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3623
egen AGTIME_3624	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3624
egen AGTIME_3625	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3625
egen AGTIME_3626	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3626
egen AGTIME_3627	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3627
egen AGTIME_3628	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3628
egen AGTIME_3629	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3629
egen AGTIME_3630	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3630
egen AGTIME_3631	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3631
egen AGTIME_3632	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3632
egen AGTIME_3633	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3633
egen AGTIME_3634	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3634
egen AGTIME_3635	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3635
egen AGTIME_3636	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3636
egen AGTIME_3637	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3637
egen AGTIME_3638	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3638
egen AGTIME_3639	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3639
egen AGTIME_3640	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3640
egen AGTIME_3641	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3641
egen AGTIME_3642	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3642
egen AGTIME_3643	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3643
egen AGTIME_3644	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3644
egen AGTIME_3645	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3645
egen AGTIME_3646	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3646
egen AGTIME_3647	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3647
egen AGTIME_3648	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3648
egen AGTIME_3649	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3649
egen AGTIME_3650	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3650
egen AGTIME_3651	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3651
egen AGTIME_3652	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3652
egen AGTIME_3653	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3653
egen AGTIME_3654	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3654
egen AGTIME_3655	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3655
egen AGTIME_3656	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3656
egen AGTIME_3657	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3657
egen AGTIME_3658	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3658
egen AGTIME_3659	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3659
egen AGTIME_3660	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3660
egen AGTIME_3661	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3661
egen AGTIME_3662	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3662
egen AGTIME_3663	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3663
egen AGTIME_3664	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3664
egen AGTIME_3665	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3665
egen AGTIME_3666	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3666
egen AGTIME_3667	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3667
egen AGTIME_3668	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3668
egen AGTIME_3669	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3669
egen AGTIME_3670	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3670
egen AGTIME_3671	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3671
egen AGTIME_3672	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3672
egen AGTIME_3673	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3673
egen AGTIME_3674	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3674
egen AGTIME_3675	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3675
egen AGTIME_3676	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3676
egen AGTIME_3677	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3677
egen AGTIME_3678	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3678
egen AGTIME_3679	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3679
egen AGTIME_3680	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3680
egen AGTIME_3681	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3681
egen AGTIME_3682	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3682
egen AGTIME_3683	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3683
egen AGTIME_3684	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3684
egen AGTIME_3685	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3685
egen AGTIME_3686	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3686
egen AGTIME_3687	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3687
egen AGTIME_3688	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3688
egen AGTIME_3689	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3689
egen AGTIME_3690	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3690
egen AGTIME_3691	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3691
egen AGTIME_3692	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3692
egen AGTIME_3693	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3693
egen AGTIME_3694	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3694
egen AGTIME_3695	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3695
egen AGTIME_3696	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3696
egen AGTIME_3697	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3697
egen AGTIME_3698	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3698
egen AGTIME_3699	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3699
egen AGTIME_3700	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3700
egen AGTIME_3701	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3701
egen AGTIME_3702	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3702
egen AGTIME_3703	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3703
egen AGTIME_3704	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3704
egen AGTIME_3705	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3705
egen AGTIME_3706	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3706
egen AGTIME_3707	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3707
egen AGTIME_3708	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3708
egen AGTIME_3709	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3709
egen AGTIME_3710	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3710
egen AGTIME_3711	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3711
egen AGTIME_3712	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3712
egen AGTIME_3713	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3713
egen AGTIME_3714	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3714
egen AGTIME_3715	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3715
egen AGTIME_3716	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3716
egen AGTIME_3717	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3717
egen AGTIME_3718	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3718
egen AGTIME_3719	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3719
egen AGTIME_3720	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3720
egen AGTIME_3721	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3721
egen AGTIME_3722	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3722
egen AGTIME_3723	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3723
egen AGTIME_3724	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3724
egen AGTIME_3725	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3725
egen AGTIME_3726	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3726
egen AGTIME_3727	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3727
egen AGTIME_3728	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3728
egen AGTIME_3729	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3729
egen AGTIME_3730	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3730
egen AGTIME_3731	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3731
egen AGTIME_3732	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3732
egen AGTIME_3733	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3733
egen AGTIME_3734	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3734
egen AGTIME_3735	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3735
egen AGTIME_3736	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3736
egen AGTIME_3737	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3737
egen AGTIME_3738	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3738
egen AGTIME_3739	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3739
egen AGTIME_3740	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3740
egen AGTIME_3741	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3741
egen AGTIME_3742	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3742
egen AGTIME_3743	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3743
egen AGTIME_3744	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3744
egen AGTIME_3745	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3745
egen AGTIME_3746	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3746
egen AGTIME_3747	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3747
egen AGTIME_3748	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3748
egen AGTIME_3749	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3749
egen AGTIME_3750	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3750
egen AGTIME_3751	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3751
egen AGTIME_3752	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3752
egen AGTIME_3753	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3753
egen AGTIME_3754	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3754
egen AGTIME_3755	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3755
egen AGTIME_3756	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3756
egen AGTIME_3757	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3757
egen AGTIME_3758	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3758
egen AGTIME_3759	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3759
egen AGTIME_3760	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3760
egen AGTIME_3761	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3761
egen AGTIME_3762	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3762
egen AGTIME_3763	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3763
egen AGTIME_3764	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3764
egen AGTIME_3765	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3765
egen AGTIME_3766	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3766
egen AGTIME_3767	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3767
egen AGTIME_3768	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3768
egen AGTIME_3769	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3769
egen AGTIME_3770	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3770
egen AGTIME_3771	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3771
egen AGTIME_3772	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3772
egen AGTIME_3773	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3773
egen AGTIME_3774	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3774
egen AGTIME_3775	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3775
egen AGTIME_3776	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3776
egen AGTIME_3777	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3777
egen AGTIME_3778	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3778
egen AGTIME_3779	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3779
egen AGTIME_3780	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3780
egen AGTIME_3781	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3781
egen AGTIME_3782	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3782
egen AGTIME_3783	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3783
egen AGTIME_3784	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3784
egen AGTIME_3785	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3785
egen AGTIME_3786	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3786
egen AGTIME_3787	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3787
egen AGTIME_3788	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3788
egen AGTIME_3789	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3789
egen AGTIME_3790	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3790
egen AGTIME_3791	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3791
egen AGTIME_3792	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3792
egen AGTIME_3793	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3793
egen AGTIME_3794	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3794
egen AGTIME_3795	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3795
egen AGTIME_3796	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3796
egen AGTIME_3797	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3797
egen AGTIME_3798	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3798
egen AGTIME_3799	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3799
egen AGTIME_3800	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3800
egen AGTIME_3801	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3801
egen AGTIME_3802	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3802
egen AGTIME_3803	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3803
egen AGTIME_3804	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3804
egen AGTIME_3805	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3805
egen AGTIME_3806	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3806
egen AGTIME_3807	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3807
egen AGTIME_3808	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3808
egen AGTIME_3809	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3809
egen AGTIME_3810	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3810
egen AGTIME_3811	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3811
egen AGTIME_3812	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3812
egen AGTIME_3813	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3813
egen AGTIME_3814	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3814
egen AGTIME_3815	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3815
egen AGTIME_3816	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3816
egen AGTIME_3817	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3817
egen AGTIME_3818	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3818
egen AGTIME_3819	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3819
egen AGTIME_3820	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3820
egen AGTIME_3821	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3821
egen AGTIME_3822	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3822
egen AGTIME_3823	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3823
egen AGTIME_3824	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3824
egen AGTIME_3825	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3825
egen AGTIME_3826	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3826
egen AGTIME_3827	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3827
egen AGTIME_3828	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3828
egen AGTIME_3829	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3829
egen AGTIME_3830	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3830
egen AGTIME_3831	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3831
egen AGTIME_3832	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3832
egen AGTIME_3833	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3833
egen AGTIME_3834	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3834
egen AGTIME_3835	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3835
egen AGTIME_3836	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3836
egen AGTIME_3837	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3837
egen AGTIME_3838	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3838
egen AGTIME_3839	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3839
egen AGTIME_3840	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3840
egen AGTIME_3841	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3841
egen AGTIME_3842	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3842
egen AGTIME_3843	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3843
egen AGTIME_3844	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3844
egen AGTIME_3845	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3845
egen AGTIME_3846	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3846
egen AGTIME_3847	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3847
egen AGTIME_3848	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3848
egen AGTIME_3849	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3849
egen AGTIME_3850	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3850
egen AGTIME_3851	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3851
egen AGTIME_3852	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3852
egen AGTIME_3853	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3853
egen AGTIME_3854	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3854
egen AGTIME_3855	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3855
egen AGTIME_3856	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3856
egen AGTIME_3857	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3857
egen AGTIME_3858	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3858
egen AGTIME_3859	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3859
egen AGTIME_3860	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3860
egen AGTIME_3861	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3861
egen AGTIME_3862	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3862
egen AGTIME_3863	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3863
egen AGTIME_3864	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3864
egen AGTIME_3865	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3865
egen AGTIME_3866	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3866
egen AGTIME_3867	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3867
egen AGTIME_3868	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3868
egen AGTIME_3869	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3869
egen AGTIME_3870	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3870
egen AGTIME_3871	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3871
egen AGTIME_3872	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3872
egen AGTIME_3873	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3873
egen AGTIME_3874	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3874
egen AGTIME_3875	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3875
egen AGTIME_3876	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3876
egen AGTIME_3877	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3877
egen AGTIME_3878	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3878
egen AGTIME_3879	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3879
egen AGTIME_3880	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3880
egen AGTIME_3881	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3881
egen AGTIME_3882	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3882
egen AGTIME_3883	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3883
egen AGTIME_3884	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3884
egen AGTIME_3885	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3885
egen AGTIME_3886	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3886
egen AGTIME_3887	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3887
egen AGTIME_3888	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3888
egen AGTIME_3889	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3889
egen AGTIME_3890	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3890
egen AGTIME_3891	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3891
egen AGTIME_3892	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3892
egen AGTIME_3893	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3893
egen AGTIME_3894	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3894
egen AGTIME_3895	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3895
egen AGTIME_3896	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3896
egen AGTIME_3897	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3897
egen AGTIME_3898	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3898
egen AGTIME_3899	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3899
egen AGTIME_3900	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3900
egen AGTIME_3901	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3901
egen AGTIME_3902	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3902
egen AGTIME_3903	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3903
egen AGTIME_3904	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3904
egen AGTIME_3905	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3905
egen AGTIME_3906	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3906
egen AGTIME_3907	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3907
egen AGTIME_3908	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3908
egen AGTIME_3909	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3909
egen AGTIME_3910	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3910
egen AGTIME_3911	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3911
egen AGTIME_3912	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3912
egen AGTIME_3913	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3913
egen AGTIME_3914	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3914
egen AGTIME_3915	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3915
egen AGTIME_3916	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3916
egen AGTIME_3917	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3917
egen AGTIME_3918	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3918
egen AGTIME_3919	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3919
egen AGTIME_3920	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3920
egen AGTIME_3921	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3921
egen AGTIME_3922	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3922
egen AGTIME_3923	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3923
egen AGTIME_3924	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3924
egen AGTIME_3925	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3925
egen AGTIME_3926	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3926
egen AGTIME_3927	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3927
egen AGTIME_3928	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3928
egen AGTIME_3929	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3929
egen AGTIME_3930	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3930
egen AGTIME_3931	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3931
egen AGTIME_3932	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3932
egen AGTIME_3933	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3933
egen AGTIME_3934	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3934
egen AGTIME_3935	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3935
egen AGTIME_3936	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3936
egen AGTIME_3937	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3937
egen AGTIME_3938	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3938
egen AGTIME_3939	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3939
egen AGTIME_3940	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3940
egen AGTIME_3941	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3941
egen AGTIME_3942	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3942
egen AGTIME_3943	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3943
egen AGTIME_3944	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3944
egen AGTIME_3945	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3945
egen AGTIME_3946	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3946
egen AGTIME_3947	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3947
egen AGTIME_3948	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3948
egen AGTIME_3949	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3949
egen AGTIME_3950	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3950
egen AGTIME_3951	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3951
egen AGTIME_3952	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3952
egen AGTIME_3953	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3953
egen AGTIME_3954	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3954
egen AGTIME_3955	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3955
egen AGTIME_3956	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3956
egen AGTIME_3957	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3957
egen AGTIME_3958	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3958
egen AGTIME_3959	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3959
egen AGTIME_3960	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3960
egen AGTIME_3961	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3961
egen AGTIME_3962	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3962
egen AGTIME_3963	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3963
egen AGTIME_3964	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3964
egen AGTIME_3965	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3965
egen AGTIME_3966	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3966
egen AGTIME_3967	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3967
egen AGTIME_3968	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3968
egen AGTIME_3969	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3969
egen AGTIME_3970	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3970
egen AGTIME_3971	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3971
egen AGTIME_3972	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3972
egen AGTIME_3973	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3973
egen AGTIME_3974	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3974
egen AGTIME_3975	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3975
egen AGTIME_3976	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3976
egen AGTIME_3977	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3977
egen AGTIME_3978	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3978
egen AGTIME_3979	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3979
egen AGTIME_3980	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3980
egen AGTIME_3981	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3981
egen AGTIME_3982	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3982
egen AGTIME_3983	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3983
egen AGTIME_3984	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3984
egen AGTIME_3985	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3985
egen AGTIME_3986	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3986
egen AGTIME_3987	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3987
egen AGTIME_3988	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3988
egen AGTIME_3989	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3989
egen AGTIME_3990	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3990
egen AGTIME_3991	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3991
egen AGTIME_3992	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3992
egen AGTIME_3993	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3993
egen AGTIME_3994	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3994
egen AGTIME_3995	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3995
egen AGTIME_3996	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3996
egen AGTIME_3997	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3997
egen AGTIME_3998	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3998
egen AGTIME_3999	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 3999
egen AGTIME_4000	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4000

save "C:\NAMED_DIRECTORY\1033_StateQTRData_2014_2023.dta", replace
clear

**REPLACE AND DROP 3501-4000
use "C:\NAMED_DIRECTORY\1033_StateQTRData_2014_2023.dta"
replace AGTIME_ID =	AGTIME_3501	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3502	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3503	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3504	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3505	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3506	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3507	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3508	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3509	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3510	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3511	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3512	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3513	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3514	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3515	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3516	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3517	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3518	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3519	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3520	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3521	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3522	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3523	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3524	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3525	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3526	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3527	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3528	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3529	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3530	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3531	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3532	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3533	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3534	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3535	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3536	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3537	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3538	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3539	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3540	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3541	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3542	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3543	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3544	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3545	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3546	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3547	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3548	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3549	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3550	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3551	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3552	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3553	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3554	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3555	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3556	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3557	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3558	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3559	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3560	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3561	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3562	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3563	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3564	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3565	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3566	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3567	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3568	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3569	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3570	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3571	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3572	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3573	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3574	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3575	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3576	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3577	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3578	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3579	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3580	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3581	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3582	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3583	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3584	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3585	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3586	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3587	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3588	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3589	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3590	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3591	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3592	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3593	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3594	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3595	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3596	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3597	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3598	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3599	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3600	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3601	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3602	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3603	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3604	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3605	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3606	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3607	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3608	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3609	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3610	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3611	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3612	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3613	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3614	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3615	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3616	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3617	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3618	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3619	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3620	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3621	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3622	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3623	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3624	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3625	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3626	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3627	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3628	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3629	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3630	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3631	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3632	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3633	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3634	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3635	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3636	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3637	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3638	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3639	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3640	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3641	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3642	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3643	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3644	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3645	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3646	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3647	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3648	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3649	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3650	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3651	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3652	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3653	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3654	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3655	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3656	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3657	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3658	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3659	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3660	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3661	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3662	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3663	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3664	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3665	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3666	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3667	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3668	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3669	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3670	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3671	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3672	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3673	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3674	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3675	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3676	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3677	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3678	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3679	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3680	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3681	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3682	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3683	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3684	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3685	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3686	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3687	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3688	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3689	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3690	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3691	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3692	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3693	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3694	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3695	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3696	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3697	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3698	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3699	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3700	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3701	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3702	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3703	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3704	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3705	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3706	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3707	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3708	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3709	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3710	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3711	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3712	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3713	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3714	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3715	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3716	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3717	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3718	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3719	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3720	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3721	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3722	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3723	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3724	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3725	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3726	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3727	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3728	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3729	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3730	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3731	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3732	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3733	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3734	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3735	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3736	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3737	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3738	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3739	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3740	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3741	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3742	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3743	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3744	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3745	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3746	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3747	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3748	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3749	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3750	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3751	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3752	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3753	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3754	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3755	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3756	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3757	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3758	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3759	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3760	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3761	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3762	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3763	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3764	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3765	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3766	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3767	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3768	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3769	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3770	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3771	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3772	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3773	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3774	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3775	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3776	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3777	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3778	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3779	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3780	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3781	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3782	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3783	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3784	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3785	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3786	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3787	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3788	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3789	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3790	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3791	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3792	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3793	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3794	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3795	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3796	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3797	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3798	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3799	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3800	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3801	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3802	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3803	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3804	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3805	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3806	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3807	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3808	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3809	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3810	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3811	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3812	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3813	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3814	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3815	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3816	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3817	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3818	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3819	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3820	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3821	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3822	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3823	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3824	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3825	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3826	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3827	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3828	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3829	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3830	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3831	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3832	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3833	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3834	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3835	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3836	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3837	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3838	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3839	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3840	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3841	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3842	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3843	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3844	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3845	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3846	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3847	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3848	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3849	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3850	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3851	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3852	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3853	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3854	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3855	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3856	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3857	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3858	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3859	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3860	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3861	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3862	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3863	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3864	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3865	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3866	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3867	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3868	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3869	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3870	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3871	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3872	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3873	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3874	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3875	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3876	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3877	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3878	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3879	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3880	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3881	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3882	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3883	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3884	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3885	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3886	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3887	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3888	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3889	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3890	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3891	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3892	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3893	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3894	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3895	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3896	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3897	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3898	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3899	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3900	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3901	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3902	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3903	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3904	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3905	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3906	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3907	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3908	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3909	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3910	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3911	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3912	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3913	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3914	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3915	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3916	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3917	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3918	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3919	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3920	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3921	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3922	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3923	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3924	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3925	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3926	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3927	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3928	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3929	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3930	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3931	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3932	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3933	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3934	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3935	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3936	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3937	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3938	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3939	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3940	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3941	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3942	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3943	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3944	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3945	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3946	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3947	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3948	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3949	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3950	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3951	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3952	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3953	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3954	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3955	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3956	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3957	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3958	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3959	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3960	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3961	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3962	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3963	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3964	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3965	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3966	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3967	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3968	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3969	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3970	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3971	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3972	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3973	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3974	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3975	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3976	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3977	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3978	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3979	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3980	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3981	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3982	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3983	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3984	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3985	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3986	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3987	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3988	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3989	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3990	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3991	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3992	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3993	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3994	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3995	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3996	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3997	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3998	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_3999	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4000	if AGTIME_ID == .

drop AGTIME_3501-AGTIME_4000

save "C:\NAMED_DIRECTORY\1033_StateQTRData_2014_2023.dta", replace
clear

**VARIABLE BLOCK 4001-4500
use "C:\NAMED_DIRECTORY\1033_StateQTRData_2014_2023.dta"
egen AGTIME_4001	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4001
egen AGTIME_4002	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4002
egen AGTIME_4003	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4003
egen AGTIME_4004	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4004
egen AGTIME_4005	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4005
egen AGTIME_4006	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4006
egen AGTIME_4007	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4007
egen AGTIME_4008	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4008
egen AGTIME_4009	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4009
egen AGTIME_4010	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4010
egen AGTIME_4011	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4011
egen AGTIME_4012	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4012
egen AGTIME_4013	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4013
egen AGTIME_4014	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4014
egen AGTIME_4015	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4015
egen AGTIME_4016	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4016
egen AGTIME_4017	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4017
egen AGTIME_4018	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4018
egen AGTIME_4019	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4019
egen AGTIME_4020	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4020
egen AGTIME_4021	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4021
egen AGTIME_4022	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4022
egen AGTIME_4023	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4023
egen AGTIME_4024	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4024
egen AGTIME_4025	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4025
egen AGTIME_4026	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4026
egen AGTIME_4027	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4027
egen AGTIME_4028	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4028
egen AGTIME_4029	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4029
egen AGTIME_4030	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4030
egen AGTIME_4031	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4031
egen AGTIME_4032	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4032
egen AGTIME_4033	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4033
egen AGTIME_4034	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4034
egen AGTIME_4035	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4035
egen AGTIME_4036	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4036
egen AGTIME_4037	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4037
egen AGTIME_4038	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4038
egen AGTIME_4039	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4039
egen AGTIME_4040	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4040
egen AGTIME_4041	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4041
egen AGTIME_4042	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4042
egen AGTIME_4043	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4043
egen AGTIME_4044	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4044
egen AGTIME_4045	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4045
egen AGTIME_4046	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4046
egen AGTIME_4047	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4047
egen AGTIME_4048	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4048
egen AGTIME_4049	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4049
egen AGTIME_4050	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4050
egen AGTIME_4051	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4051
egen AGTIME_4052	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4052
egen AGTIME_4053	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4053
egen AGTIME_4054	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4054
egen AGTIME_4055	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4055
egen AGTIME_4056	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4056
egen AGTIME_4057	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4057
egen AGTIME_4058	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4058
egen AGTIME_4059	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4059
egen AGTIME_4060	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4060
egen AGTIME_4061	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4061
egen AGTIME_4062	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4062
egen AGTIME_4063	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4063
egen AGTIME_4064	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4064
egen AGTIME_4065	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4065
egen AGTIME_4066	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4066
egen AGTIME_4067	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4067
egen AGTIME_4068	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4068
egen AGTIME_4069	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4069
egen AGTIME_4070	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4070
egen AGTIME_4071	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4071
egen AGTIME_4072	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4072
egen AGTIME_4073	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4073
egen AGTIME_4074	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4074
egen AGTIME_4075	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4075
egen AGTIME_4076	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4076
egen AGTIME_4077	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4077
egen AGTIME_4078	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4078
egen AGTIME_4079	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4079
egen AGTIME_4080	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4080
egen AGTIME_4081	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4081
egen AGTIME_4082	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4082
egen AGTIME_4083	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4083
egen AGTIME_4084	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4084
egen AGTIME_4085	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4085
egen AGTIME_4086	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4086
egen AGTIME_4087	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4087
egen AGTIME_4088	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4088
egen AGTIME_4089	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4089
egen AGTIME_4090	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4090
egen AGTIME_4091	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4091
egen AGTIME_4092	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4092
egen AGTIME_4093	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4093
egen AGTIME_4094	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4094
egen AGTIME_4095	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4095
egen AGTIME_4096	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4096
egen AGTIME_4097	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4097
egen AGTIME_4098	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4098
egen AGTIME_4099	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4099
egen AGTIME_4100	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4100
egen AGTIME_4101	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4101
egen AGTIME_4102	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4102
egen AGTIME_4103	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4103
egen AGTIME_4104	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4104
egen AGTIME_4105	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4105
egen AGTIME_4106	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4106
egen AGTIME_4107	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4107
egen AGTIME_4108	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4108
egen AGTIME_4109	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4109
egen AGTIME_4110	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4110
egen AGTIME_4111	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4111
egen AGTIME_4112	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4112
egen AGTIME_4113	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4113
egen AGTIME_4114	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4114
egen AGTIME_4115	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4115
egen AGTIME_4116	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4116
egen AGTIME_4117	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4117
egen AGTIME_4118	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4118
egen AGTIME_4119	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4119
egen AGTIME_4120	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4120
egen AGTIME_4121	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4121
egen AGTIME_4122	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4122
egen AGTIME_4123	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4123
egen AGTIME_4124	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4124
egen AGTIME_4125	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4125
egen AGTIME_4126	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4126
egen AGTIME_4127	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4127
egen AGTIME_4128	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4128
egen AGTIME_4129	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4129
egen AGTIME_4130	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4130
egen AGTIME_4131	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4131
egen AGTIME_4132	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4132
egen AGTIME_4133	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4133
egen AGTIME_4134	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4134
egen AGTIME_4135	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4135
egen AGTIME_4136	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4136
egen AGTIME_4137	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4137
egen AGTIME_4138	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4138
egen AGTIME_4139	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4139
egen AGTIME_4140	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4140
egen AGTIME_4141	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4141
egen AGTIME_4142	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4142
egen AGTIME_4143	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4143
egen AGTIME_4144	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4144
egen AGTIME_4145	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4145
egen AGTIME_4146	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4146
egen AGTIME_4147	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4147
egen AGTIME_4148	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4148
egen AGTIME_4149	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4149
egen AGTIME_4150	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4150
egen AGTIME_4151	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4151
egen AGTIME_4152	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4152
egen AGTIME_4153	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4153
egen AGTIME_4154	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4154
egen AGTIME_4155	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4155
egen AGTIME_4156	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4156
egen AGTIME_4157	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4157
egen AGTIME_4158	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4158
egen AGTIME_4159	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4159
egen AGTIME_4160	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4160
egen AGTIME_4161	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4161
egen AGTIME_4162	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4162
egen AGTIME_4163	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4163
egen AGTIME_4164	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4164
egen AGTIME_4165	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4165
egen AGTIME_4166	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4166
egen AGTIME_4167	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4167
egen AGTIME_4168	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4168
egen AGTIME_4169	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4169
egen AGTIME_4170	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4170
egen AGTIME_4171	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4171
egen AGTIME_4172	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4172
egen AGTIME_4173	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4173
egen AGTIME_4174	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4174
egen AGTIME_4175	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4175
egen AGTIME_4176	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4176
egen AGTIME_4177	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4177
egen AGTIME_4178	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4178
egen AGTIME_4179	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4179
egen AGTIME_4180	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4180
egen AGTIME_4181	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4181
egen AGTIME_4182	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4182
egen AGTIME_4183	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4183
egen AGTIME_4184	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4184
egen AGTIME_4185	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4185
egen AGTIME_4186	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4186
egen AGTIME_4187	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4187
egen AGTIME_4188	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4188
egen AGTIME_4189	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4189
egen AGTIME_4190	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4190
egen AGTIME_4191	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4191
egen AGTIME_4192	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4192
egen AGTIME_4193	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4193
egen AGTIME_4194	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4194
egen AGTIME_4195	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4195
egen AGTIME_4196	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4196
egen AGTIME_4197	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4197
egen AGTIME_4198	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4198
egen AGTIME_4199	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4199
egen AGTIME_4200	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4200
egen AGTIME_4201	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4201
egen AGTIME_4202	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4202
egen AGTIME_4203	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4203
egen AGTIME_4204	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4204
egen AGTIME_4205	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4205
egen AGTIME_4206	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4206
egen AGTIME_4207	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4207
egen AGTIME_4208	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4208
egen AGTIME_4209	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4209
egen AGTIME_4210	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4210
egen AGTIME_4211	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4211
egen AGTIME_4212	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4212
egen AGTIME_4213	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4213
egen AGTIME_4214	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4214
egen AGTIME_4215	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4215
egen AGTIME_4216	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4216
egen AGTIME_4217	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4217
egen AGTIME_4218	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4218
egen AGTIME_4219	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4219
egen AGTIME_4220	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4220
egen AGTIME_4221	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4221
egen AGTIME_4222	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4222
egen AGTIME_4223	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4223
egen AGTIME_4224	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4224
egen AGTIME_4225	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4225
egen AGTIME_4226	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4226
egen AGTIME_4227	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4227
egen AGTIME_4228	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4228
egen AGTIME_4229	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4229
egen AGTIME_4230	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4230
egen AGTIME_4231	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4231
egen AGTIME_4232	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4232
egen AGTIME_4233	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4233
egen AGTIME_4234	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4234
egen AGTIME_4235	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4235
egen AGTIME_4236	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4236
egen AGTIME_4237	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4237
egen AGTIME_4238	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4238
egen AGTIME_4239	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4239
egen AGTIME_4240	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4240
egen AGTIME_4241	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4241
egen AGTIME_4242	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4242
egen AGTIME_4243	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4243
egen AGTIME_4244	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4244
egen AGTIME_4245	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4245
egen AGTIME_4246	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4246
egen AGTIME_4247	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4247
egen AGTIME_4248	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4248
egen AGTIME_4249	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4249
egen AGTIME_4250	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4250
egen AGTIME_4251	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4251
egen AGTIME_4252	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4252
egen AGTIME_4253	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4253
egen AGTIME_4254	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4254
egen AGTIME_4255	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4255
egen AGTIME_4256	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4256
egen AGTIME_4257	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4257
egen AGTIME_4258	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4258
egen AGTIME_4259	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4259
egen AGTIME_4260	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4260
egen AGTIME_4261	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4261
egen AGTIME_4262	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4262
egen AGTIME_4263	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4263
egen AGTIME_4264	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4264
egen AGTIME_4265	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4265
egen AGTIME_4266	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4266
egen AGTIME_4267	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4267
egen AGTIME_4268	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4268
egen AGTIME_4269	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4269
egen AGTIME_4270	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4270
egen AGTIME_4271	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4271
egen AGTIME_4272	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4272
egen AGTIME_4273	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4273
egen AGTIME_4274	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4274
egen AGTIME_4275	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4275
egen AGTIME_4276	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4276
egen AGTIME_4277	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4277
egen AGTIME_4278	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4278
egen AGTIME_4279	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4279
egen AGTIME_4280	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4280
egen AGTIME_4281	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4281
egen AGTIME_4282	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4282
egen AGTIME_4283	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4283
egen AGTIME_4284	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4284
egen AGTIME_4285	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4285
egen AGTIME_4286	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4286
egen AGTIME_4287	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4287
egen AGTIME_4288	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4288
egen AGTIME_4289	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4289
egen AGTIME_4290	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4290
egen AGTIME_4291	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4291
egen AGTIME_4292	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4292
egen AGTIME_4293	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4293
egen AGTIME_4294	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4294
egen AGTIME_4295	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4295
egen AGTIME_4296	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4296
egen AGTIME_4297	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4297
egen AGTIME_4298	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4298
egen AGTIME_4299	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4299
egen AGTIME_4300	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4300
egen AGTIME_4301	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4301
egen AGTIME_4302	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4302
egen AGTIME_4303	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4303
egen AGTIME_4304	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4304
egen AGTIME_4305	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4305
egen AGTIME_4306	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4306
egen AGTIME_4307	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4307
egen AGTIME_4308	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4308
egen AGTIME_4309	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4309
egen AGTIME_4310	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4310
egen AGTIME_4311	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4311
egen AGTIME_4312	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4312
egen AGTIME_4313	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4313
egen AGTIME_4314	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4314
egen AGTIME_4315	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4315
egen AGTIME_4316	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4316
egen AGTIME_4317	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4317
egen AGTIME_4318	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4318
egen AGTIME_4319	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4319
egen AGTIME_4320	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4320
egen AGTIME_4321	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4321
egen AGTIME_4322	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4322
egen AGTIME_4323	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4323
egen AGTIME_4324	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4324
egen AGTIME_4325	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4325
egen AGTIME_4326	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4326
egen AGTIME_4327	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4327
egen AGTIME_4328	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4328
egen AGTIME_4329	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4329
egen AGTIME_4330	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4330
egen AGTIME_4331	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4331
egen AGTIME_4332	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4332
egen AGTIME_4333	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4333
egen AGTIME_4334	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4334
egen AGTIME_4335	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4335
egen AGTIME_4336	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4336
egen AGTIME_4337	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4337
egen AGTIME_4338	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4338
egen AGTIME_4339	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4339
egen AGTIME_4340	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4340
egen AGTIME_4341	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4341
egen AGTIME_4342	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4342
egen AGTIME_4343	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4343
egen AGTIME_4344	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4344
egen AGTIME_4345	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4345
egen AGTIME_4346	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4346
egen AGTIME_4347	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4347
egen AGTIME_4348	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4348
egen AGTIME_4349	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4349
egen AGTIME_4350	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4350
egen AGTIME_4351	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4351
egen AGTIME_4352	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4352
egen AGTIME_4353	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4353
egen AGTIME_4354	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4354
egen AGTIME_4355	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4355
egen AGTIME_4356	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4356
egen AGTIME_4357	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4357
egen AGTIME_4358	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4358
egen AGTIME_4359	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4359
egen AGTIME_4360	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4360
egen AGTIME_4361	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4361
egen AGTIME_4362	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4362
egen AGTIME_4363	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4363
egen AGTIME_4364	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4364
egen AGTIME_4365	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4365
egen AGTIME_4366	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4366
egen AGTIME_4367	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4367
egen AGTIME_4368	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4368
egen AGTIME_4369	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4369
egen AGTIME_4370	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4370
egen AGTIME_4371	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4371
egen AGTIME_4372	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4372
egen AGTIME_4373	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4373
egen AGTIME_4374	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4374
egen AGTIME_4375	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4375
egen AGTIME_4376	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4376
egen AGTIME_4377	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4377
egen AGTIME_4378	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4378
egen AGTIME_4379	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4379
egen AGTIME_4380	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4380
egen AGTIME_4381	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4381
egen AGTIME_4382	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4382
egen AGTIME_4383	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4383
egen AGTIME_4384	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4384
egen AGTIME_4385	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4385
egen AGTIME_4386	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4386
egen AGTIME_4387	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4387
egen AGTIME_4388	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4388
egen AGTIME_4389	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4389
egen AGTIME_4390	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4390
egen AGTIME_4391	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4391
egen AGTIME_4392	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4392
egen AGTIME_4393	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4393
egen AGTIME_4394	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4394
egen AGTIME_4395	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4395
egen AGTIME_4396	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4396
egen AGTIME_4397	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4397
egen AGTIME_4398	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4398
egen AGTIME_4399	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4399
egen AGTIME_4400	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4400
egen AGTIME_4401	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4401
egen AGTIME_4402	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4402
egen AGTIME_4403	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4403
egen AGTIME_4404	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4404
egen AGTIME_4405	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4405
egen AGTIME_4406	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4406
egen AGTIME_4407	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4407
egen AGTIME_4408	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4408
egen AGTIME_4409	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4409
egen AGTIME_4410	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4410
egen AGTIME_4411	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4411
egen AGTIME_4412	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4412
egen AGTIME_4413	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4413
egen AGTIME_4414	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4414
egen AGTIME_4415	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4415
egen AGTIME_4416	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4416
egen AGTIME_4417	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4417
egen AGTIME_4418	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4418
egen AGTIME_4419	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4419
egen AGTIME_4420	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4420
egen AGTIME_4421	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4421
egen AGTIME_4422	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4422
egen AGTIME_4423	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4423
egen AGTIME_4424	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4424
egen AGTIME_4425	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4425
egen AGTIME_4426	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4426
egen AGTIME_4427	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4427
egen AGTIME_4428	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4428
egen AGTIME_4429	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4429
egen AGTIME_4430	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4430
egen AGTIME_4431	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4431
egen AGTIME_4432	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4432
egen AGTIME_4433	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4433
egen AGTIME_4434	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4434
egen AGTIME_4435	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4435
egen AGTIME_4436	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4436
egen AGTIME_4437	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4437
egen AGTIME_4438	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4438
egen AGTIME_4439	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4439
egen AGTIME_4440	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4440
egen AGTIME_4441	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4441
egen AGTIME_4442	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4442
egen AGTIME_4443	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4443
egen AGTIME_4444	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4444
egen AGTIME_4445	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4445
egen AGTIME_4446	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4446
egen AGTIME_4447	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4447
egen AGTIME_4448	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4448
egen AGTIME_4449	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4449
egen AGTIME_4450	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4450
egen AGTIME_4451	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4451
egen AGTIME_4452	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4452
egen AGTIME_4453	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4453
egen AGTIME_4454	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4454
egen AGTIME_4455	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4455
egen AGTIME_4456	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4456
egen AGTIME_4457	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4457
egen AGTIME_4458	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4458
egen AGTIME_4459	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4459
egen AGTIME_4460	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4460
egen AGTIME_4461	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4461
egen AGTIME_4462	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4462
egen AGTIME_4463	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4463
egen AGTIME_4464	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4464
egen AGTIME_4465	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4465
egen AGTIME_4466	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4466
egen AGTIME_4467	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4467
egen AGTIME_4468	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4468
egen AGTIME_4469	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4469
egen AGTIME_4470	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4470
egen AGTIME_4471	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4471
egen AGTIME_4472	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4472
egen AGTIME_4473	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4473
egen AGTIME_4474	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4474
egen AGTIME_4475	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4475
egen AGTIME_4476	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4476
egen AGTIME_4477	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4477
egen AGTIME_4478	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4478
egen AGTIME_4479	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4479
egen AGTIME_4480	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4480
egen AGTIME_4481	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4481
egen AGTIME_4482	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4482
egen AGTIME_4483	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4483
egen AGTIME_4484	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4484
egen AGTIME_4485	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4485
egen AGTIME_4486	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4486
egen AGTIME_4487	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4487
egen AGTIME_4488	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4488
egen AGTIME_4489	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4489
egen AGTIME_4490	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4490
egen AGTIME_4491	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4491
egen AGTIME_4492	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4492
egen AGTIME_4493	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4493
egen AGTIME_4494	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4494
egen AGTIME_4495	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4495
egen AGTIME_4496	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4496
egen AGTIME_4497	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4497
egen AGTIME_4498	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4498
egen AGTIME_4499	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4499
egen AGTIME_4500	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4500

save "C:\NAMED_DIRECTORY\1033_StateQTRData_2014_2023.dta", replace
clear

**REPLACE AND DROP 4001-4500
use "C:\NAMED_DIRECTORY\1033_StateQTRData_2014_2023.dta"
replace AGTIME_ID =	AGTIME_4001	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4002	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4003	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4004	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4005	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4006	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4007	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4008	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4009	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4010	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4011	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4012	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4013	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4014	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4015	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4016	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4017	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4018	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4019	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4020	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4021	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4022	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4023	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4024	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4025	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4026	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4027	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4028	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4029	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4030	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4031	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4032	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4033	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4034	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4035	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4036	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4037	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4038	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4039	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4040	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4041	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4042	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4043	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4044	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4045	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4046	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4047	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4048	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4049	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4050	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4051	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4052	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4053	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4054	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4055	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4056	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4057	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4058	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4059	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4060	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4061	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4062	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4063	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4064	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4065	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4066	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4067	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4068	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4069	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4070	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4071	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4072	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4073	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4074	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4075	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4076	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4077	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4078	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4079	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4080	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4081	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4082	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4083	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4084	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4085	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4086	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4087	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4088	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4089	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4090	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4091	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4092	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4093	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4094	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4095	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4096	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4097	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4098	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4099	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4100	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4101	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4102	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4103	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4104	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4105	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4106	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4107	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4108	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4109	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4110	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4111	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4112	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4113	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4114	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4115	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4116	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4117	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4118	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4119	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4120	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4121	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4122	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4123	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4124	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4125	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4126	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4127	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4128	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4129	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4130	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4131	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4132	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4133	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4134	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4135	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4136	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4137	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4138	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4139	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4140	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4141	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4142	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4143	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4144	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4145	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4146	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4147	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4148	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4149	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4150	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4151	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4152	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4153	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4154	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4155	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4156	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4157	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4158	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4159	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4160	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4161	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4162	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4163	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4164	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4165	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4166	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4167	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4168	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4169	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4170	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4171	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4172	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4173	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4174	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4175	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4176	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4177	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4178	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4179	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4180	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4181	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4182	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4183	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4184	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4185	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4186	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4187	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4188	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4189	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4190	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4191	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4192	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4193	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4194	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4195	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4196	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4197	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4198	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4199	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4200	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4201	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4202	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4203	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4204	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4205	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4206	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4207	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4208	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4209	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4210	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4211	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4212	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4213	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4214	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4215	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4216	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4217	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4218	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4219	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4220	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4221	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4222	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4223	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4224	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4225	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4226	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4227	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4228	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4229	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4230	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4231	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4232	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4233	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4234	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4235	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4236	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4237	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4238	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4239	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4240	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4241	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4242	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4243	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4244	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4245	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4246	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4247	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4248	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4249	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4250	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4251	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4252	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4253	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4254	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4255	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4256	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4257	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4258	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4259	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4260	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4261	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4262	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4263	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4264	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4265	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4266	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4267	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4268	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4269	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4270	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4271	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4272	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4273	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4274	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4275	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4276	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4277	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4278	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4279	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4280	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4281	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4282	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4283	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4284	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4285	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4286	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4287	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4288	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4289	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4290	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4291	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4292	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4293	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4294	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4295	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4296	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4297	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4298	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4299	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4300	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4301	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4302	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4303	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4304	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4305	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4306	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4307	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4308	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4309	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4310	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4311	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4312	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4313	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4314	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4315	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4316	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4317	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4318	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4319	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4320	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4321	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4322	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4323	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4324	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4325	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4326	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4327	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4328	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4329	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4330	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4331	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4332	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4333	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4334	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4335	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4336	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4337	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4338	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4339	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4340	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4341	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4342	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4343	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4344	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4345	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4346	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4347	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4348	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4349	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4350	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4351	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4352	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4353	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4354	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4355	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4356	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4357	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4358	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4359	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4360	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4361	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4362	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4363	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4364	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4365	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4366	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4367	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4368	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4369	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4370	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4371	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4372	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4373	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4374	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4375	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4376	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4377	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4378	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4379	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4380	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4381	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4382	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4383	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4384	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4385	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4386	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4387	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4388	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4389	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4390	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4391	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4392	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4393	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4394	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4395	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4396	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4397	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4398	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4399	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4400	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4401	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4402	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4403	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4404	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4405	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4406	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4407	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4408	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4409	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4410	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4411	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4412	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4413	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4414	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4415	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4416	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4417	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4418	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4419	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4420	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4421	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4422	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4423	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4424	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4425	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4426	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4427	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4428	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4429	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4430	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4431	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4432	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4433	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4434	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4435	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4436	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4437	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4438	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4439	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4440	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4441	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4442	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4443	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4444	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4445	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4446	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4447	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4448	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4449	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4450	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4451	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4452	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4453	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4454	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4455	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4456	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4457	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4458	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4459	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4460	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4461	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4462	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4463	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4464	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4465	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4466	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4467	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4468	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4469	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4470	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4471	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4472	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4473	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4474	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4475	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4476	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4477	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4478	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4479	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4480	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4481	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4482	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4483	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4484	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4485	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4486	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4487	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4488	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4489	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4490	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4491	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4492	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4493	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4494	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4495	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4496	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4497	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4498	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4499	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4500	if AGTIME_ID == .

drop AGTIME_4001-AGTIME_4500

save "C:\NAMED_DIRECTORY\1033_StateQTRData_2014_2023.dta", replace
clear

**VARIABLE BLOCK 4501-5000
use "C:\NAMED_DIRECTORY\1033_StateQTRData_2014_2023.dta"
egen AGTIME_4501	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4501
egen AGTIME_4502	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4502
egen AGTIME_4503	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4503
egen AGTIME_4504	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4504
egen AGTIME_4505	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4505
egen AGTIME_4506	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4506
egen AGTIME_4507	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4507
egen AGTIME_4508	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4508
egen AGTIME_4509	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4509
egen AGTIME_4510	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4510
egen AGTIME_4511	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4511
egen AGTIME_4512	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4512
egen AGTIME_4513	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4513
egen AGTIME_4514	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4514
egen AGTIME_4515	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4515
egen AGTIME_4516	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4516
egen AGTIME_4517	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4517
egen AGTIME_4518	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4518
egen AGTIME_4519	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4519
egen AGTIME_4520	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4520
egen AGTIME_4521	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4521
egen AGTIME_4522	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4522
egen AGTIME_4523	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4523
egen AGTIME_4524	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4524
egen AGTIME_4525	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4525
egen AGTIME_4526	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4526
egen AGTIME_4527	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4527
egen AGTIME_4528	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4528
egen AGTIME_4529	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4529
egen AGTIME_4530	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4530
egen AGTIME_4531	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4531
egen AGTIME_4532	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4532
egen AGTIME_4533	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4533
egen AGTIME_4534	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4534
egen AGTIME_4535	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4535
egen AGTIME_4536	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4536
egen AGTIME_4537	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4537
egen AGTIME_4538	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4538
egen AGTIME_4539	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4539
egen AGTIME_4540	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4540
egen AGTIME_4541	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4541
egen AGTIME_4542	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4542
egen AGTIME_4543	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4543
egen AGTIME_4544	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4544
egen AGTIME_4545	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4545
egen AGTIME_4546	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4546
egen AGTIME_4547	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4547
egen AGTIME_4548	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4548
egen AGTIME_4549	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4549
egen AGTIME_4550	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4550
egen AGTIME_4551	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4551
egen AGTIME_4552	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4552
egen AGTIME_4553	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4553
egen AGTIME_4554	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4554
egen AGTIME_4555	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4555
egen AGTIME_4556	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4556
egen AGTIME_4557	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4557
egen AGTIME_4558	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4558
egen AGTIME_4559	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4559
egen AGTIME_4560	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4560
egen AGTIME_4561	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4561
egen AGTIME_4562	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4562
egen AGTIME_4563	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4563
egen AGTIME_4564	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4564
egen AGTIME_4565	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4565
egen AGTIME_4566	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4566
egen AGTIME_4567	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4567
egen AGTIME_4568	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4568
egen AGTIME_4569	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4569
egen AGTIME_4570	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4570
egen AGTIME_4571	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4571
egen AGTIME_4572	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4572
egen AGTIME_4573	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4573
egen AGTIME_4574	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4574
egen AGTIME_4575	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4575
egen AGTIME_4576	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4576
egen AGTIME_4577	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4577
egen AGTIME_4578	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4578
egen AGTIME_4579	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4579
egen AGTIME_4580	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4580
egen AGTIME_4581	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4581
egen AGTIME_4582	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4582
egen AGTIME_4583	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4583
egen AGTIME_4584	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4584
egen AGTIME_4585	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4585
egen AGTIME_4586	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4586
egen AGTIME_4587	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4587
egen AGTIME_4588	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4588
egen AGTIME_4589	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4589
egen AGTIME_4590	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4590
egen AGTIME_4591	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4591
egen AGTIME_4592	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4592
egen AGTIME_4593	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4593
egen AGTIME_4594	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4594
egen AGTIME_4595	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4595
egen AGTIME_4596	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4596
egen AGTIME_4597	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4597
egen AGTIME_4598	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4598
egen AGTIME_4599	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4599
egen AGTIME_4600	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4600
egen AGTIME_4601	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4601
egen AGTIME_4602	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4602
egen AGTIME_4603	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4603
egen AGTIME_4604	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4604
egen AGTIME_4605	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4605
egen AGTIME_4606	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4606
egen AGTIME_4607	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4607
egen AGTIME_4608	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4608
egen AGTIME_4609	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4609
egen AGTIME_4610	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4610
egen AGTIME_4611	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4611
egen AGTIME_4612	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4612
egen AGTIME_4613	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4613
egen AGTIME_4614	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4614
egen AGTIME_4615	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4615
egen AGTIME_4616	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4616
egen AGTIME_4617	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4617
egen AGTIME_4618	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4618
egen AGTIME_4619	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4619
egen AGTIME_4620	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4620
egen AGTIME_4621	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4621
egen AGTIME_4622	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4622
egen AGTIME_4623	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4623
egen AGTIME_4624	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4624
egen AGTIME_4625	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4625
egen AGTIME_4626	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4626
egen AGTIME_4627	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4627
egen AGTIME_4628	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4628
egen AGTIME_4629	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4629
egen AGTIME_4630	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4630
egen AGTIME_4631	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4631
egen AGTIME_4632	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4632
egen AGTIME_4633	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4633
egen AGTIME_4634	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4634
egen AGTIME_4635	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4635
egen AGTIME_4636	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4636
egen AGTIME_4637	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4637
egen AGTIME_4638	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4638
egen AGTIME_4639	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4639
egen AGTIME_4640	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4640
egen AGTIME_4641	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4641
egen AGTIME_4642	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4642
egen AGTIME_4643	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4643
egen AGTIME_4644	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4644
egen AGTIME_4645	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4645
egen AGTIME_4646	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4646
egen AGTIME_4647	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4647
egen AGTIME_4648	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4648
egen AGTIME_4649	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4649
egen AGTIME_4650	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4650
egen AGTIME_4651	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4651
egen AGTIME_4652	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4652
egen AGTIME_4653	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4653
egen AGTIME_4654	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4654
egen AGTIME_4655	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4655
egen AGTIME_4656	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4656
egen AGTIME_4657	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4657
egen AGTIME_4658	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4658
egen AGTIME_4659	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4659
egen AGTIME_4660	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4660
egen AGTIME_4661	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4661
egen AGTIME_4662	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4662
egen AGTIME_4663	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4663
egen AGTIME_4664	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4664
egen AGTIME_4665	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4665
egen AGTIME_4666	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4666
egen AGTIME_4667	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4667
egen AGTIME_4668	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4668
egen AGTIME_4669	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4669
egen AGTIME_4670	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4670
egen AGTIME_4671	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4671
egen AGTIME_4672	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4672
egen AGTIME_4673	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4673
egen AGTIME_4674	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4674
egen AGTIME_4675	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4675
egen AGTIME_4676	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4676
egen AGTIME_4677	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4677
egen AGTIME_4678	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4678
egen AGTIME_4679	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4679
egen AGTIME_4680	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4680
egen AGTIME_4681	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4681
egen AGTIME_4682	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4682
egen AGTIME_4683	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4683
egen AGTIME_4684	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4684
egen AGTIME_4685	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4685
egen AGTIME_4686	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4686
egen AGTIME_4687	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4687
egen AGTIME_4688	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4688
egen AGTIME_4689	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4689
egen AGTIME_4690	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4690
egen AGTIME_4691	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4691
egen AGTIME_4692	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4692
egen AGTIME_4693	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4693
egen AGTIME_4694	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4694
egen AGTIME_4695	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4695
egen AGTIME_4696	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4696
egen AGTIME_4697	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4697
egen AGTIME_4698	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4698
egen AGTIME_4699	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4699
egen AGTIME_4700	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4700
egen AGTIME_4701	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4701
egen AGTIME_4702	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4702
egen AGTIME_4703	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4703
egen AGTIME_4704	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4704
egen AGTIME_4705	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4705
egen AGTIME_4706	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4706
egen AGTIME_4707	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4707
egen AGTIME_4708	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4708
egen AGTIME_4709	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4709
egen AGTIME_4710	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4710
egen AGTIME_4711	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4711
egen AGTIME_4712	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4712
egen AGTIME_4713	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4713
egen AGTIME_4714	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4714
egen AGTIME_4715	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4715
egen AGTIME_4716	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4716
egen AGTIME_4717	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4717
egen AGTIME_4718	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4718
egen AGTIME_4719	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4719
egen AGTIME_4720	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4720
egen AGTIME_4721	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4721
egen AGTIME_4722	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4722
egen AGTIME_4723	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4723
egen AGTIME_4724	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4724
egen AGTIME_4725	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4725
egen AGTIME_4726	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4726
egen AGTIME_4727	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4727
egen AGTIME_4728	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4728
egen AGTIME_4729	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4729
egen AGTIME_4730	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4730
egen AGTIME_4731	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4731
egen AGTIME_4732	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4732
egen AGTIME_4733	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4733
egen AGTIME_4734	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4734
egen AGTIME_4735	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4735
egen AGTIME_4736	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4736
egen AGTIME_4737	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4737
egen AGTIME_4738	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4738
egen AGTIME_4739	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4739
egen AGTIME_4740	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4740
egen AGTIME_4741	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4741
egen AGTIME_4742	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4742
egen AGTIME_4743	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4743
egen AGTIME_4744	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4744
egen AGTIME_4745	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4745
egen AGTIME_4746	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4746
egen AGTIME_4747	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4747
egen AGTIME_4748	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4748
egen AGTIME_4749	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4749
egen AGTIME_4750	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4750
egen AGTIME_4751	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4751
egen AGTIME_4752	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4752
egen AGTIME_4753	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4753
egen AGTIME_4754	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4754
egen AGTIME_4755	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4755
egen AGTIME_4756	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4756
egen AGTIME_4757	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4757
egen AGTIME_4758	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4758
egen AGTIME_4759	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4759
egen AGTIME_4760	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4760
egen AGTIME_4761	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4761
egen AGTIME_4762	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4762
egen AGTIME_4763	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4763
egen AGTIME_4764	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4764
egen AGTIME_4765	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4765
egen AGTIME_4766	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4766
egen AGTIME_4767	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4767
egen AGTIME_4768	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4768
egen AGTIME_4769	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4769
egen AGTIME_4770	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4770
egen AGTIME_4771	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4771
egen AGTIME_4772	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4772
egen AGTIME_4773	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4773
egen AGTIME_4774	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4774
egen AGTIME_4775	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4775
egen AGTIME_4776	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4776
egen AGTIME_4777	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4777
egen AGTIME_4778	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4778
egen AGTIME_4779	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4779
egen AGTIME_4780	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4780
egen AGTIME_4781	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4781
egen AGTIME_4782	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4782
egen AGTIME_4783	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4783
egen AGTIME_4784	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4784
egen AGTIME_4785	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4785
egen AGTIME_4786	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4786
egen AGTIME_4787	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4787
egen AGTIME_4788	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4788
egen AGTIME_4789	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4789
egen AGTIME_4790	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4790
egen AGTIME_4791	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4791
egen AGTIME_4792	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4792
egen AGTIME_4793	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4793
egen AGTIME_4794	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4794
egen AGTIME_4795	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4795
egen AGTIME_4796	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4796
egen AGTIME_4797	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4797
egen AGTIME_4798	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4798
egen AGTIME_4799	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4799
egen AGTIME_4800	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4800
egen AGTIME_4801	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4801
egen AGTIME_4802	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4802
egen AGTIME_4803	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4803
egen AGTIME_4804	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4804
egen AGTIME_4805	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4805
egen AGTIME_4806	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4806
egen AGTIME_4807	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4807
egen AGTIME_4808	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4808
egen AGTIME_4809	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4809
egen AGTIME_4810	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4810
egen AGTIME_4811	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4811
egen AGTIME_4812	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4812
egen AGTIME_4813	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4813
egen AGTIME_4814	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4814
egen AGTIME_4815	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4815
egen AGTIME_4816	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4816
egen AGTIME_4817	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4817
egen AGTIME_4818	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4818
egen AGTIME_4819	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4819
egen AGTIME_4820	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4820
egen AGTIME_4821	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4821
egen AGTIME_4822	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4822
egen AGTIME_4823	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4823
egen AGTIME_4824	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4824
egen AGTIME_4825	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4825
egen AGTIME_4826	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4826
egen AGTIME_4827	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4827
egen AGTIME_4828	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4828
egen AGTIME_4829	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4829
egen AGTIME_4830	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4830
egen AGTIME_4831	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4831
egen AGTIME_4832	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4832
egen AGTIME_4833	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4833
egen AGTIME_4834	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4834
egen AGTIME_4835	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4835
egen AGTIME_4836	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4836
egen AGTIME_4837	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4837
egen AGTIME_4838	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4838
egen AGTIME_4839	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4839
egen AGTIME_4840	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4840
egen AGTIME_4841	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4841
egen AGTIME_4842	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4842
egen AGTIME_4843	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4843
egen AGTIME_4844	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4844
egen AGTIME_4845	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4845
egen AGTIME_4846	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4846
egen AGTIME_4847	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4847
egen AGTIME_4848	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4848
egen AGTIME_4849	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4849
egen AGTIME_4850	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4850
egen AGTIME_4851	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4851
egen AGTIME_4852	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4852
egen AGTIME_4853	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4853
egen AGTIME_4854	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4854
egen AGTIME_4855	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4855
egen AGTIME_4856	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4856
egen AGTIME_4857	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4857
egen AGTIME_4858	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4858
egen AGTIME_4859	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4859
egen AGTIME_4860	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4860
egen AGTIME_4861	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4861
egen AGTIME_4862	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4862
egen AGTIME_4863	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4863
egen AGTIME_4864	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4864
egen AGTIME_4865	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4865
egen AGTIME_4866	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4866
egen AGTIME_4867	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4867
egen AGTIME_4868	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4868
egen AGTIME_4869	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4869
egen AGTIME_4870	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4870
egen AGTIME_4871	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4871
egen AGTIME_4872	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4872
egen AGTIME_4873	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4873
egen AGTIME_4874	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4874
egen AGTIME_4875	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4875
egen AGTIME_4876	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4876
egen AGTIME_4877	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4877
egen AGTIME_4878	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4878
egen AGTIME_4879	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4879
egen AGTIME_4880	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4880
egen AGTIME_4881	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4881
egen AGTIME_4882	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4882
egen AGTIME_4883	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4883
egen AGTIME_4884	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4884
egen AGTIME_4885	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4885
egen AGTIME_4886	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4886
egen AGTIME_4887	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4887
egen AGTIME_4888	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4888
egen AGTIME_4889	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4889
egen AGTIME_4890	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4890
egen AGTIME_4891	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4891
egen AGTIME_4892	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4892
egen AGTIME_4893	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4893
egen AGTIME_4894	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4894
egen AGTIME_4895	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4895
egen AGTIME_4896	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4896
egen AGTIME_4897	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4897
egen AGTIME_4898	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4898
egen AGTIME_4899	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4899
egen AGTIME_4900	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4900
egen AGTIME_4901	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4901
egen AGTIME_4902	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4902
egen AGTIME_4903	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4903
egen AGTIME_4904	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4904
egen AGTIME_4905	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4905
egen AGTIME_4906	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4906
egen AGTIME_4907	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4907
egen AGTIME_4908	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4908
egen AGTIME_4909	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4909
egen AGTIME_4910	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4910
egen AGTIME_4911	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4911
egen AGTIME_4912	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4912
egen AGTIME_4913	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4913
egen AGTIME_4914	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4914
egen AGTIME_4915	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4915
egen AGTIME_4916	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4916
egen AGTIME_4917	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4917
egen AGTIME_4918	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4918
egen AGTIME_4919	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4919
egen AGTIME_4920	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4920
egen AGTIME_4921	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4921
egen AGTIME_4922	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4922
egen AGTIME_4923	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4923
egen AGTIME_4924	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4924
egen AGTIME_4925	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4925
egen AGTIME_4926	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4926
egen AGTIME_4927	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4927
egen AGTIME_4928	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4928
egen AGTIME_4929	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4929
egen AGTIME_4930	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4930
egen AGTIME_4931	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4931
egen AGTIME_4932	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4932
egen AGTIME_4933	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4933
egen AGTIME_4934	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4934
egen AGTIME_4935	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4935
egen AGTIME_4936	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4936
egen AGTIME_4937	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4937
egen AGTIME_4938	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4938
egen AGTIME_4939	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4939
egen AGTIME_4940	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4940
egen AGTIME_4941	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4941
egen AGTIME_4942	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4942
egen AGTIME_4943	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4943
egen AGTIME_4944	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4944
egen AGTIME_4945	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4945
egen AGTIME_4946	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4946
egen AGTIME_4947	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4947
egen AGTIME_4948	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4948
egen AGTIME_4949	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4949
egen AGTIME_4950	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4950
egen AGTIME_4951	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4951
egen AGTIME_4952	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4952
egen AGTIME_4953	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4953
egen AGTIME_4954	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4954
egen AGTIME_4955	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4955
egen AGTIME_4956	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4956
egen AGTIME_4957	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4957
egen AGTIME_4958	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4958
egen AGTIME_4959	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4959
egen AGTIME_4960	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4960
egen AGTIME_4961	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4961
egen AGTIME_4962	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4962
egen AGTIME_4963	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4963
egen AGTIME_4964	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4964
egen AGTIME_4965	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4965
egen AGTIME_4966	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4966
egen AGTIME_4967	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4967
egen AGTIME_4968	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4968
egen AGTIME_4969	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4969
egen AGTIME_4970	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4970
egen AGTIME_4971	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4971
egen AGTIME_4972	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4972
egen AGTIME_4973	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4973
egen AGTIME_4974	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4974
egen AGTIME_4975	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4975
egen AGTIME_4976	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4976
egen AGTIME_4977	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4977
egen AGTIME_4978	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4978
egen AGTIME_4979	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4979
egen AGTIME_4980	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4980
egen AGTIME_4981	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4981
egen AGTIME_4982	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4982
egen AGTIME_4983	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4983
egen AGTIME_4984	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4984
egen AGTIME_4985	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4985
egen AGTIME_4986	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4986
egen AGTIME_4987	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4987
egen AGTIME_4988	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4988
egen AGTIME_4989	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4989
egen AGTIME_4990	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4990
egen AGTIME_4991	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4991
egen AGTIME_4992	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4992
egen AGTIME_4993	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4993
egen AGTIME_4994	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4994
egen AGTIME_4995	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4995
egen AGTIME_4996	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4996
egen AGTIME_4997	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4997
egen AGTIME_4998	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4998
egen AGTIME_4999	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 4999
egen AGTIME_5000	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5000

save "C:\NAMED_DIRECTORY\1033_StateQTRData_2014_2023.dta", replace
clear

**REPLACE AND DROP 4501-5000
use "C:\NAMED_DIRECTORY\1033_StateQTRData_2014_2023.dta"
replace AGTIME_ID =	AGTIME_4501	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4502	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4503	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4504	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4505	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4506	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4507	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4508	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4509	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4510	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4511	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4512	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4513	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4514	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4515	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4516	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4517	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4518	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4519	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4520	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4521	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4522	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4523	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4524	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4525	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4526	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4527	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4528	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4529	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4530	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4531	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4532	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4533	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4534	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4535	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4536	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4537	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4538	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4539	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4540	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4541	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4542	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4543	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4544	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4545	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4546	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4547	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4548	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4549	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4550	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4551	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4552	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4553	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4554	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4555	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4556	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4557	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4558	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4559	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4560	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4561	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4562	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4563	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4564	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4565	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4566	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4567	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4568	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4569	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4570	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4571	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4572	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4573	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4574	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4575	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4576	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4577	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4578	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4579	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4580	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4581	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4582	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4583	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4584	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4585	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4586	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4587	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4588	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4589	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4590	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4591	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4592	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4593	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4594	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4595	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4596	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4597	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4598	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4599	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4600	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4601	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4602	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4603	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4604	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4605	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4606	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4607	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4608	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4609	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4610	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4611	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4612	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4613	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4614	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4615	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4616	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4617	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4618	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4619	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4620	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4621	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4622	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4623	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4624	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4625	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4626	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4627	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4628	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4629	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4630	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4631	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4632	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4633	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4634	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4635	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4636	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4637	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4638	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4639	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4640	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4641	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4642	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4643	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4644	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4645	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4646	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4647	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4648	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4649	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4650	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4651	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4652	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4653	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4654	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4655	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4656	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4657	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4658	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4659	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4660	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4661	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4662	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4663	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4664	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4665	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4666	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4667	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4668	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4669	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4670	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4671	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4672	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4673	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4674	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4675	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4676	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4677	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4678	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4679	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4680	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4681	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4682	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4683	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4684	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4685	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4686	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4687	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4688	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4689	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4690	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4691	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4692	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4693	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4694	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4695	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4696	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4697	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4698	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4699	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4700	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4701	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4702	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4703	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4704	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4705	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4706	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4707	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4708	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4709	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4710	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4711	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4712	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4713	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4714	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4715	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4716	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4717	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4718	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4719	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4720	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4721	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4722	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4723	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4724	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4725	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4726	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4727	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4728	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4729	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4730	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4731	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4732	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4733	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4734	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4735	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4736	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4737	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4738	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4739	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4740	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4741	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4742	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4743	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4744	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4745	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4746	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4747	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4748	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4749	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4750	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4751	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4752	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4753	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4754	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4755	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4756	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4757	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4758	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4759	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4760	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4761	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4762	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4763	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4764	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4765	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4766	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4767	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4768	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4769	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4770	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4771	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4772	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4773	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4774	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4775	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4776	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4777	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4778	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4779	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4780	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4781	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4782	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4783	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4784	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4785	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4786	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4787	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4788	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4789	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4790	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4791	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4792	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4793	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4794	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4795	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4796	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4797	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4798	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4799	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4800	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4801	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4802	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4803	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4804	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4805	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4806	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4807	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4808	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4809	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4810	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4811	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4812	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4813	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4814	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4815	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4816	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4817	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4818	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4819	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4820	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4821	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4822	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4823	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4824	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4825	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4826	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4827	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4828	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4829	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4830	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4831	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4832	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4833	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4834	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4835	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4836	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4837	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4838	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4839	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4840	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4841	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4842	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4843	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4844	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4845	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4846	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4847	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4848	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4849	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4850	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4851	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4852	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4853	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4854	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4855	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4856	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4857	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4858	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4859	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4860	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4861	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4862	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4863	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4864	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4865	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4866	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4867	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4868	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4869	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4870	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4871	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4872	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4873	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4874	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4875	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4876	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4877	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4878	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4879	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4880	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4881	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4882	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4883	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4884	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4885	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4886	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4887	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4888	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4889	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4890	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4891	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4892	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4893	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4894	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4895	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4896	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4897	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4898	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4899	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4900	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4901	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4902	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4903	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4904	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4905	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4906	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4907	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4908	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4909	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4910	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4911	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4912	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4913	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4914	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4915	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4916	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4917	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4918	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4919	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4920	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4921	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4922	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4923	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4924	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4925	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4926	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4927	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4928	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4929	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4930	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4931	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4932	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4933	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4934	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4935	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4936	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4937	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4938	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4939	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4940	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4941	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4942	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4943	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4944	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4945	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4946	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4947	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4948	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4949	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4950	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4951	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4952	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4953	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4954	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4955	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4956	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4957	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4958	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4959	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4960	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4961	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4962	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4963	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4964	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4965	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4966	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4967	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4968	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4969	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4970	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4971	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4972	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4973	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4974	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4975	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4976	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4977	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4978	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4979	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4980	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4981	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4982	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4983	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4984	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4985	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4986	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4987	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4988	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4989	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4990	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4991	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4992	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4993	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4994	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4995	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4996	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4997	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4998	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_4999	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5000	if AGTIME_ID == .

drop AGTIME_4501-AGTIME_5000

save "C:\NAMED_DIRECTORY\1033_StateQTRData_2014_2023.dta", replace
clear

**VARIABLE BLOCK 5001-5500
use "C:\NAMED_DIRECTORY\1033_StateQTRData_2014_2023.dta"
egen AGTIME_5001	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5001
egen AGTIME_5002	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5002
egen AGTIME_5003	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5003
egen AGTIME_5004	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5004
egen AGTIME_5005	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5005
egen AGTIME_5006	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5006
egen AGTIME_5007	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5007
egen AGTIME_5008	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5008
egen AGTIME_5009	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5009
egen AGTIME_5010	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5010
egen AGTIME_5011	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5011
egen AGTIME_5012	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5012
egen AGTIME_5013	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5013
egen AGTIME_5014	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5014
egen AGTIME_5015	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5015
egen AGTIME_5016	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5016
egen AGTIME_5017	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5017
egen AGTIME_5018	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5018
egen AGTIME_5019	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5019
egen AGTIME_5020	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5020
egen AGTIME_5021	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5021
egen AGTIME_5022	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5022
egen AGTIME_5023	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5023
egen AGTIME_5024	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5024
egen AGTIME_5025	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5025
egen AGTIME_5026	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5026
egen AGTIME_5027	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5027
egen AGTIME_5028	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5028
egen AGTIME_5029	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5029
egen AGTIME_5030	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5030
egen AGTIME_5031	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5031
egen AGTIME_5032	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5032
egen AGTIME_5033	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5033
egen AGTIME_5034	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5034
egen AGTIME_5035	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5035
egen AGTIME_5036	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5036
egen AGTIME_5037	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5037
egen AGTIME_5038	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5038
egen AGTIME_5039	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5039
egen AGTIME_5040	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5040
egen AGTIME_5041	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5041
egen AGTIME_5042	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5042
egen AGTIME_5043	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5043
egen AGTIME_5044	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5044
egen AGTIME_5045	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5045
egen AGTIME_5046	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5046
egen AGTIME_5047	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5047
egen AGTIME_5048	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5048
egen AGTIME_5049	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5049
egen AGTIME_5050	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5050
egen AGTIME_5051	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5051
egen AGTIME_5052	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5052
egen AGTIME_5053	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5053
egen AGTIME_5054	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5054
egen AGTIME_5055	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5055
egen AGTIME_5056	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5056
egen AGTIME_5057	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5057
egen AGTIME_5058	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5058
egen AGTIME_5059	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5059
egen AGTIME_5060	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5060
egen AGTIME_5061	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5061
egen AGTIME_5062	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5062
egen AGTIME_5063	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5063
egen AGTIME_5064	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5064
egen AGTIME_5065	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5065
egen AGTIME_5066	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5066
egen AGTIME_5067	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5067
egen AGTIME_5068	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5068
egen AGTIME_5069	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5069
egen AGTIME_5070	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5070
egen AGTIME_5071	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5071
egen AGTIME_5072	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5072
egen AGTIME_5073	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5073
egen AGTIME_5074	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5074
egen AGTIME_5075	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5075
egen AGTIME_5076	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5076
egen AGTIME_5077	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5077
egen AGTIME_5078	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5078
egen AGTIME_5079	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5079
egen AGTIME_5080	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5080
egen AGTIME_5081	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5081
egen AGTIME_5082	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5082
egen AGTIME_5083	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5083
egen AGTIME_5084	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5084
egen AGTIME_5085	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5085
egen AGTIME_5086	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5086
egen AGTIME_5087	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5087
egen AGTIME_5088	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5088
egen AGTIME_5089	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5089
egen AGTIME_5090	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5090
egen AGTIME_5091	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5091
egen AGTIME_5092	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5092
egen AGTIME_5093	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5093
egen AGTIME_5094	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5094
egen AGTIME_5095	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5095
egen AGTIME_5096	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5096
egen AGTIME_5097	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5097
egen AGTIME_5098	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5098
egen AGTIME_5099	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5099
egen AGTIME_5100	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5100
egen AGTIME_5101	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5101
egen AGTIME_5102	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5102
egen AGTIME_5103	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5103
egen AGTIME_5104	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5104
egen AGTIME_5105	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5105
egen AGTIME_5106	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5106
egen AGTIME_5107	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5107
egen AGTIME_5108	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5108
egen AGTIME_5109	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5109
egen AGTIME_5110	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5110
egen AGTIME_5111	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5111
egen AGTIME_5112	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5112
egen AGTIME_5113	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5113
egen AGTIME_5114	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5114
egen AGTIME_5115	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5115
egen AGTIME_5116	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5116
egen AGTIME_5117	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5117
egen AGTIME_5118	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5118
egen AGTIME_5119	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5119
egen AGTIME_5120	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5120
egen AGTIME_5121	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5121
egen AGTIME_5122	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5122
egen AGTIME_5123	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5123
egen AGTIME_5124	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5124
egen AGTIME_5125	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5125
egen AGTIME_5126	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5126
egen AGTIME_5127	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5127
egen AGTIME_5128	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5128
egen AGTIME_5129	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5129
egen AGTIME_5130	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5130
egen AGTIME_5131	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5131
egen AGTIME_5132	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5132
egen AGTIME_5133	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5133
egen AGTIME_5134	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5134
egen AGTIME_5135	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5135
egen AGTIME_5136	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5136
egen AGTIME_5137	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5137
egen AGTIME_5138	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5138
egen AGTIME_5139	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5139
egen AGTIME_5140	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5140
egen AGTIME_5141	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5141
egen AGTIME_5142	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5142
egen AGTIME_5143	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5143
egen AGTIME_5144	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5144
egen AGTIME_5145	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5145
egen AGTIME_5146	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5146
egen AGTIME_5147	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5147
egen AGTIME_5148	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5148
egen AGTIME_5149	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5149
egen AGTIME_5150	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5150
egen AGTIME_5151	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5151
egen AGTIME_5152	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5152
egen AGTIME_5153	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5153
egen AGTIME_5154	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5154
egen AGTIME_5155	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5155
egen AGTIME_5156	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5156
egen AGTIME_5157	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5157
egen AGTIME_5158	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5158
egen AGTIME_5159	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5159
egen AGTIME_5160	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5160
egen AGTIME_5161	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5161
egen AGTIME_5162	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5162
egen AGTIME_5163	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5163
egen AGTIME_5164	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5164
egen AGTIME_5165	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5165
egen AGTIME_5166	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5166
egen AGTIME_5167	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5167
egen AGTIME_5168	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5168
egen AGTIME_5169	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5169
egen AGTIME_5170	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5170
egen AGTIME_5171	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5171
egen AGTIME_5172	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5172
egen AGTIME_5173	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5173
egen AGTIME_5174	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5174
egen AGTIME_5175	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5175
egen AGTIME_5176	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5176
egen AGTIME_5177	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5177
egen AGTIME_5178	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5178
egen AGTIME_5179	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5179
egen AGTIME_5180	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5180
egen AGTIME_5181	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5181
egen AGTIME_5182	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5182
egen AGTIME_5183	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5183
egen AGTIME_5184	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5184
egen AGTIME_5185	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5185
egen AGTIME_5186	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5186
egen AGTIME_5187	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5187
egen AGTIME_5188	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5188
egen AGTIME_5189	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5189
egen AGTIME_5190	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5190
egen AGTIME_5191	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5191
egen AGTIME_5192	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5192
egen AGTIME_5193	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5193
egen AGTIME_5194	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5194
egen AGTIME_5195	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5195
egen AGTIME_5196	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5196
egen AGTIME_5197	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5197
egen AGTIME_5198	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5198
egen AGTIME_5199	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5199
egen AGTIME_5200	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5200
egen AGTIME_5201	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5201
egen AGTIME_5202	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5202
egen AGTIME_5203	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5203
egen AGTIME_5204	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5204
egen AGTIME_5205	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5205
egen AGTIME_5206	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5206
egen AGTIME_5207	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5207
egen AGTIME_5208	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5208
egen AGTIME_5209	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5209
egen AGTIME_5210	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5210
egen AGTIME_5211	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5211
egen AGTIME_5212	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5212
egen AGTIME_5213	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5213
egen AGTIME_5214	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5214
egen AGTIME_5215	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5215
egen AGTIME_5216	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5216
egen AGTIME_5217	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5217
egen AGTIME_5218	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5218
egen AGTIME_5219	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5219
egen AGTIME_5220	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5220
egen AGTIME_5221	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5221
egen AGTIME_5222	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5222
egen AGTIME_5223	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5223
egen AGTIME_5224	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5224
egen AGTIME_5225	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5225
egen AGTIME_5226	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5226
egen AGTIME_5227	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5227
egen AGTIME_5228	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5228
egen AGTIME_5229	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5229
egen AGTIME_5230	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5230
egen AGTIME_5231	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5231
egen AGTIME_5232	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5232
egen AGTIME_5233	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5233
egen AGTIME_5234	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5234
egen AGTIME_5235	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5235
egen AGTIME_5236	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5236
egen AGTIME_5237	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5237
egen AGTIME_5238	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5238
egen AGTIME_5239	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5239
egen AGTIME_5240	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5240
egen AGTIME_5241	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5241
egen AGTIME_5242	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5242
egen AGTIME_5243	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5243
egen AGTIME_5244	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5244
egen AGTIME_5245	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5245
egen AGTIME_5246	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5246
egen AGTIME_5247	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5247
egen AGTIME_5248	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5248
egen AGTIME_5249	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5249
egen AGTIME_5250	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5250
egen AGTIME_5251	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5251
egen AGTIME_5252	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5252
egen AGTIME_5253	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5253
egen AGTIME_5254	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5254
egen AGTIME_5255	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5255
egen AGTIME_5256	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5256
egen AGTIME_5257	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5257
egen AGTIME_5258	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5258
egen AGTIME_5259	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5259
egen AGTIME_5260	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5260
egen AGTIME_5261	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5261
egen AGTIME_5262	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5262
egen AGTIME_5263	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5263
egen AGTIME_5264	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5264
egen AGTIME_5265	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5265
egen AGTIME_5266	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5266
egen AGTIME_5267	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5267
egen AGTIME_5268	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5268
egen AGTIME_5269	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5269
egen AGTIME_5270	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5270
egen AGTIME_5271	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5271
egen AGTIME_5272	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5272
egen AGTIME_5273	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5273
egen AGTIME_5274	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5274
egen AGTIME_5275	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5275
egen AGTIME_5276	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5276
egen AGTIME_5277	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5277
egen AGTIME_5278	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5278
egen AGTIME_5279	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5279
egen AGTIME_5280	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5280
egen AGTIME_5281	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5281
egen AGTIME_5282	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5282
egen AGTIME_5283	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5283
egen AGTIME_5284	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5284
egen AGTIME_5285	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5285
egen AGTIME_5286	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5286
egen AGTIME_5287	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5287
egen AGTIME_5288	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5288
egen AGTIME_5289	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5289
egen AGTIME_5290	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5290
egen AGTIME_5291	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5291
egen AGTIME_5292	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5292
egen AGTIME_5293	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5293
egen AGTIME_5294	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5294
egen AGTIME_5295	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5295
egen AGTIME_5296	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5296
egen AGTIME_5297	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5297
egen AGTIME_5298	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5298
egen AGTIME_5299	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5299
egen AGTIME_5300	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5300
egen AGTIME_5301	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5301
egen AGTIME_5302	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5302
egen AGTIME_5303	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5303
egen AGTIME_5304	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5304
egen AGTIME_5305	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5305
egen AGTIME_5306	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5306
egen AGTIME_5307	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5307
egen AGTIME_5308	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5308
egen AGTIME_5309	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5309
egen AGTIME_5310	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5310
egen AGTIME_5311	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5311
egen AGTIME_5312	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5312
egen AGTIME_5313	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5313
egen AGTIME_5314	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5314
egen AGTIME_5315	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5315
egen AGTIME_5316	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5316
egen AGTIME_5317	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5317
egen AGTIME_5318	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5318
egen AGTIME_5319	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5319
egen AGTIME_5320	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5320
egen AGTIME_5321	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5321
egen AGTIME_5322	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5322
egen AGTIME_5323	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5323
egen AGTIME_5324	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5324
egen AGTIME_5325	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5325
egen AGTIME_5326	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5326
egen AGTIME_5327	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5327
egen AGTIME_5328	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5328
egen AGTIME_5329	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5329
egen AGTIME_5330	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5330
egen AGTIME_5331	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5331
egen AGTIME_5332	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5332
egen AGTIME_5333	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5333
egen AGTIME_5334	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5334
egen AGTIME_5335	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5335
egen AGTIME_5336	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5336
egen AGTIME_5337	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5337
egen AGTIME_5338	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5338
egen AGTIME_5339	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5339
egen AGTIME_5340	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5340
egen AGTIME_5341	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5341
egen AGTIME_5342	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5342
egen AGTIME_5343	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5343
egen AGTIME_5344	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5344
egen AGTIME_5345	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5345
egen AGTIME_5346	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5346
egen AGTIME_5347	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5347
egen AGTIME_5348	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5348
egen AGTIME_5349	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5349
egen AGTIME_5350	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5350
egen AGTIME_5351	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5351
egen AGTIME_5352	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5352
egen AGTIME_5353	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5353
egen AGTIME_5354	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5354
egen AGTIME_5355	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5355
egen AGTIME_5356	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5356
egen AGTIME_5357	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5357
egen AGTIME_5358	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5358
egen AGTIME_5359	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5359
egen AGTIME_5360	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5360
egen AGTIME_5361	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5361
egen AGTIME_5362	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5362
egen AGTIME_5363	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5363
egen AGTIME_5364	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5364
egen AGTIME_5365	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5365
egen AGTIME_5366	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5366
egen AGTIME_5367	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5367
egen AGTIME_5368	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5368
egen AGTIME_5369	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5369
egen AGTIME_5370	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5370
egen AGTIME_5371	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5371
egen AGTIME_5372	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5372
egen AGTIME_5373	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5373
egen AGTIME_5374	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5374
egen AGTIME_5375	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5375
egen AGTIME_5376	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5376
egen AGTIME_5377	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5377
egen AGTIME_5378	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5378
egen AGTIME_5379	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5379
egen AGTIME_5380	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5380
egen AGTIME_5381	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5381
egen AGTIME_5382	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5382
egen AGTIME_5383	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5383
egen AGTIME_5384	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5384
egen AGTIME_5385	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5385
egen AGTIME_5386	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5386
egen AGTIME_5387	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5387
egen AGTIME_5388	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5388
egen AGTIME_5389	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5389
egen AGTIME_5390	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5390
egen AGTIME_5391	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5391
egen AGTIME_5392	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5392
egen AGTIME_5393	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5393
egen AGTIME_5394	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5394
egen AGTIME_5395	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5395
egen AGTIME_5396	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5396
egen AGTIME_5397	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5397
egen AGTIME_5398	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5398
egen AGTIME_5399	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5399
egen AGTIME_5400	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5400
egen AGTIME_5401	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5401
egen AGTIME_5402	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5402
egen AGTIME_5403	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5403
egen AGTIME_5404	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5404
egen AGTIME_5405	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5405
egen AGTIME_5406	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5406
egen AGTIME_5407	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5407
egen AGTIME_5408	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5408
egen AGTIME_5409	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5409
egen AGTIME_5410	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5410
egen AGTIME_5411	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5411
egen AGTIME_5412	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5412
egen AGTIME_5413	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5413
egen AGTIME_5414	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5414
egen AGTIME_5415	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5415
egen AGTIME_5416	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5416
egen AGTIME_5417	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5417
egen AGTIME_5418	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5418
egen AGTIME_5419	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5419
egen AGTIME_5420	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5420
egen AGTIME_5421	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5421
egen AGTIME_5422	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5422
egen AGTIME_5423	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5423
egen AGTIME_5424	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5424
egen AGTIME_5425	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5425
egen AGTIME_5426	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5426
egen AGTIME_5427	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5427
egen AGTIME_5428	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5428
egen AGTIME_5429	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5429
egen AGTIME_5430	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5430
egen AGTIME_5431	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5431
egen AGTIME_5432	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5432
egen AGTIME_5433	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5433
egen AGTIME_5434	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5434
egen AGTIME_5435	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5435
egen AGTIME_5436	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5436
egen AGTIME_5437	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5437
egen AGTIME_5438	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5438
egen AGTIME_5439	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5439
egen AGTIME_5440	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5440
egen AGTIME_5441	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5441
egen AGTIME_5442	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5442
egen AGTIME_5443	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5443
egen AGTIME_5444	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5444
egen AGTIME_5445	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5445
egen AGTIME_5446	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5446
egen AGTIME_5447	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5447
egen AGTIME_5448	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5448
egen AGTIME_5449	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5449
egen AGTIME_5450	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5450
egen AGTIME_5451	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5451
egen AGTIME_5452	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5452
egen AGTIME_5453	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5453
egen AGTIME_5454	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5454
egen AGTIME_5455	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5455
egen AGTIME_5456	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5456
egen AGTIME_5457	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5457
egen AGTIME_5458	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5458
egen AGTIME_5459	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5459
egen AGTIME_5460	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5460
egen AGTIME_5461	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5461
egen AGTIME_5462	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5462
egen AGTIME_5463	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5463
egen AGTIME_5464	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5464
egen AGTIME_5465	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5465
egen AGTIME_5466	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5466
egen AGTIME_5467	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5467
egen AGTIME_5468	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5468
egen AGTIME_5469	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5469
egen AGTIME_5470	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5470
egen AGTIME_5471	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5471
egen AGTIME_5472	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5472
egen AGTIME_5473	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5473
egen AGTIME_5474	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5474
egen AGTIME_5475	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5475
egen AGTIME_5476	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5476
egen AGTIME_5477	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5477
egen AGTIME_5478	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5478
egen AGTIME_5479	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5479
egen AGTIME_5480	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5480
egen AGTIME_5481	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5481
egen AGTIME_5482	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5482
egen AGTIME_5483	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5483
egen AGTIME_5484	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5484
egen AGTIME_5485	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5485
egen AGTIME_5486	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5486
egen AGTIME_5487	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5487
egen AGTIME_5488	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5488
egen AGTIME_5489	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5489
egen AGTIME_5490	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5490
egen AGTIME_5491	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5491
egen AGTIME_5492	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5492
egen AGTIME_5493	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5493
egen AGTIME_5494	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5494
egen AGTIME_5495	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5495
egen AGTIME_5496	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5496
egen AGTIME_5497	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5497
egen AGTIME_5498	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5498
egen AGTIME_5499	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5499
egen AGTIME_5500	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5500

save "C:\NAMED_DIRECTORY\1033_StateQTRData_2014_2023.dta", replace
clear

**REPLACE AND DROP 5001-5500
use "C:\NAMED_DIRECTORY\1033_StateQTRData_2014_2023.dta"
replace AGTIME_ID =	AGTIME_5001	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5002	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5003	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5004	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5005	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5006	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5007	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5008	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5009	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5010	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5011	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5012	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5013	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5014	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5015	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5016	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5017	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5018	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5019	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5020	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5021	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5022	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5023	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5024	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5025	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5026	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5027	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5028	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5029	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5030	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5031	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5032	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5033	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5034	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5035	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5036	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5037	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5038	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5039	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5040	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5041	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5042	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5043	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5044	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5045	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5046	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5047	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5048	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5049	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5050	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5051	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5052	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5053	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5054	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5055	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5056	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5057	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5058	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5059	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5060	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5061	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5062	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5063	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5064	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5065	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5066	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5067	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5068	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5069	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5070	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5071	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5072	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5073	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5074	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5075	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5076	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5077	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5078	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5079	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5080	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5081	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5082	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5083	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5084	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5085	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5086	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5087	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5088	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5089	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5090	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5091	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5092	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5093	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5094	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5095	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5096	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5097	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5098	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5099	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5100	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5101	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5102	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5103	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5104	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5105	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5106	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5107	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5108	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5109	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5110	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5111	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5112	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5113	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5114	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5115	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5116	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5117	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5118	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5119	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5120	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5121	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5122	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5123	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5124	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5125	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5126	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5127	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5128	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5129	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5130	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5131	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5132	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5133	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5134	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5135	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5136	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5137	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5138	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5139	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5140	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5141	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5142	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5143	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5144	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5145	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5146	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5147	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5148	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5149	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5150	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5151	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5152	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5153	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5154	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5155	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5156	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5157	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5158	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5159	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5160	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5161	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5162	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5163	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5164	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5165	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5166	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5167	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5168	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5169	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5170	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5171	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5172	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5173	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5174	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5175	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5176	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5177	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5178	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5179	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5180	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5181	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5182	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5183	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5184	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5185	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5186	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5187	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5188	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5189	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5190	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5191	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5192	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5193	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5194	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5195	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5196	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5197	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5198	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5199	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5200	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5201	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5202	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5203	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5204	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5205	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5206	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5207	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5208	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5209	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5210	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5211	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5212	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5213	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5214	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5215	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5216	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5217	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5218	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5219	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5220	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5221	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5222	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5223	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5224	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5225	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5226	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5227	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5228	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5229	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5230	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5231	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5232	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5233	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5234	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5235	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5236	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5237	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5238	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5239	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5240	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5241	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5242	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5243	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5244	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5245	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5246	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5247	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5248	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5249	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5250	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5251	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5252	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5253	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5254	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5255	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5256	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5257	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5258	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5259	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5260	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5261	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5262	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5263	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5264	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5265	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5266	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5267	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5268	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5269	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5270	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5271	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5272	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5273	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5274	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5275	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5276	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5277	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5278	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5279	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5280	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5281	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5282	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5283	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5284	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5285	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5286	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5287	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5288	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5289	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5290	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5291	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5292	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5293	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5294	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5295	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5296	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5297	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5298	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5299	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5300	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5301	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5302	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5303	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5304	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5305	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5306	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5307	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5308	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5309	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5310	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5311	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5312	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5313	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5314	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5315	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5316	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5317	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5318	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5319	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5320	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5321	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5322	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5323	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5324	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5325	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5326	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5327	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5328	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5329	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5330	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5331	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5332	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5333	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5334	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5335	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5336	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5337	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5338	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5339	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5340	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5341	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5342	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5343	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5344	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5345	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5346	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5347	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5348	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5349	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5350	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5351	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5352	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5353	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5354	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5355	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5356	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5357	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5358	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5359	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5360	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5361	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5362	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5363	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5364	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5365	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5366	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5367	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5368	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5369	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5370	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5371	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5372	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5373	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5374	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5375	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5376	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5377	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5378	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5379	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5380	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5381	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5382	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5383	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5384	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5385	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5386	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5387	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5388	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5389	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5390	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5391	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5392	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5393	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5394	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5395	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5396	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5397	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5398	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5399	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5400	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5401	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5402	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5403	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5404	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5405	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5406	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5407	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5408	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5409	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5410	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5411	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5412	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5413	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5414	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5415	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5416	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5417	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5418	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5419	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5420	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5421	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5422	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5423	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5424	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5425	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5426	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5427	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5428	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5429	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5430	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5431	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5432	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5433	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5434	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5435	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5436	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5437	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5438	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5439	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5440	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5441	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5442	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5443	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5444	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5445	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5446	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5447	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5448	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5449	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5450	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5451	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5452	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5453	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5454	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5455	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5456	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5457	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5458	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5459	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5460	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5461	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5462	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5463	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5464	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5465	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5466	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5467	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5468	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5469	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5470	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5471	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5472	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5473	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5474	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5475	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5476	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5477	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5478	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5479	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5480	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5481	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5482	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5483	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5484	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5485	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5486	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5487	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5488	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5489	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5490	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5491	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5492	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5493	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5494	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5495	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5496	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5497	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5498	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5499	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5500	if AGTIME_ID == .

drop AGTIME_5001-AGTIME_5500

save "C:\NAMED_DIRECTORY\1033_StateQTRData_2014_2023.dta", replace
clear

**VARIABLE BLOCK 5501-6000
use "C:\NAMED_DIRECTORY\1033_StateQTRData_2014_2023.dta"
egen AGTIME_5501	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5501
egen AGTIME_5502	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5502
egen AGTIME_5503	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5503
egen AGTIME_5504	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5504
egen AGTIME_5505	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5505
egen AGTIME_5506	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5506
egen AGTIME_5507	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5507
egen AGTIME_5508	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5508
egen AGTIME_5509	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5509
egen AGTIME_5510	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5510
egen AGTIME_5511	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5511
egen AGTIME_5512	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5512
egen AGTIME_5513	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5513
egen AGTIME_5514	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5514
egen AGTIME_5515	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5515
egen AGTIME_5516	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5516
egen AGTIME_5517	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5517
egen AGTIME_5518	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5518
egen AGTIME_5519	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5519
egen AGTIME_5520	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5520
egen AGTIME_5521	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5521
egen AGTIME_5522	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5522
egen AGTIME_5523	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5523
egen AGTIME_5524	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5524
egen AGTIME_5525	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5525
egen AGTIME_5526	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5526
egen AGTIME_5527	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5527
egen AGTIME_5528	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5528
egen AGTIME_5529	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5529
egen AGTIME_5530	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5530
egen AGTIME_5531	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5531
egen AGTIME_5532	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5532
egen AGTIME_5533	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5533
egen AGTIME_5534	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5534
egen AGTIME_5535	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5535
egen AGTIME_5536	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5536
egen AGTIME_5537	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5537
egen AGTIME_5538	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5538
egen AGTIME_5539	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5539
egen AGTIME_5540	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5540
egen AGTIME_5541	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5541
egen AGTIME_5542	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5542
egen AGTIME_5543	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5543
egen AGTIME_5544	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5544
egen AGTIME_5545	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5545
egen AGTIME_5546	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5546
egen AGTIME_5547	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5547
egen AGTIME_5548	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5548
egen AGTIME_5549	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5549
egen AGTIME_5550	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5550
egen AGTIME_5551	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5551
egen AGTIME_5552	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5552
egen AGTIME_5553	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5553
egen AGTIME_5554	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5554
egen AGTIME_5555	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5555
egen AGTIME_5556	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5556
egen AGTIME_5557	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5557
egen AGTIME_5558	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5558
egen AGTIME_5559	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5559
egen AGTIME_5560	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5560
egen AGTIME_5561	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5561
egen AGTIME_5562	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5562
egen AGTIME_5563	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5563
egen AGTIME_5564	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5564
egen AGTIME_5565	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5565
egen AGTIME_5566	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5566
egen AGTIME_5567	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5567
egen AGTIME_5568	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5568
egen AGTIME_5569	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5569
egen AGTIME_5570	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5570
egen AGTIME_5571	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5571
egen AGTIME_5572	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5572
egen AGTIME_5573	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5573
egen AGTIME_5574	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5574
egen AGTIME_5575	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5575
egen AGTIME_5576	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5576
egen AGTIME_5577	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5577
egen AGTIME_5578	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5578
egen AGTIME_5579	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5579
egen AGTIME_5580	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5580
egen AGTIME_5581	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5581
egen AGTIME_5582	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5582
egen AGTIME_5583	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5583
egen AGTIME_5584	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5584
egen AGTIME_5585	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5585
egen AGTIME_5586	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5586
egen AGTIME_5587	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5587
egen AGTIME_5588	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5588
egen AGTIME_5589	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5589
egen AGTIME_5590	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5590
egen AGTIME_5591	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5591
egen AGTIME_5592	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5592
egen AGTIME_5593	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5593
egen AGTIME_5594	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5594
egen AGTIME_5595	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5595
egen AGTIME_5596	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5596
egen AGTIME_5597	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5597
egen AGTIME_5598	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5598
egen AGTIME_5599	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5599
egen AGTIME_5600	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5600
egen AGTIME_5601	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5601
egen AGTIME_5602	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5602
egen AGTIME_5603	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5603
egen AGTIME_5604	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5604
egen AGTIME_5605	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5605
egen AGTIME_5606	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5606
egen AGTIME_5607	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5607
egen AGTIME_5608	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5608
egen AGTIME_5609	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5609
egen AGTIME_5610	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5610
egen AGTIME_5611	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5611
egen AGTIME_5612	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5612
egen AGTIME_5613	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5613
egen AGTIME_5614	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5614
egen AGTIME_5615	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5615
egen AGTIME_5616	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5616
egen AGTIME_5617	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5617
egen AGTIME_5618	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5618
egen AGTIME_5619	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5619
egen AGTIME_5620	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5620
egen AGTIME_5621	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5621
egen AGTIME_5622	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5622
egen AGTIME_5623	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5623
egen AGTIME_5624	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5624
egen AGTIME_5625	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5625
egen AGTIME_5626	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5626
egen AGTIME_5627	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5627
egen AGTIME_5628	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5628
egen AGTIME_5629	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5629
egen AGTIME_5630	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5630
egen AGTIME_5631	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5631
egen AGTIME_5632	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5632
egen AGTIME_5633	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5633
egen AGTIME_5634	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5634
egen AGTIME_5635	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5635
egen AGTIME_5636	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5636
egen AGTIME_5637	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5637
egen AGTIME_5638	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5638
egen AGTIME_5639	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5639
egen AGTIME_5640	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5640
egen AGTIME_5641	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5641
egen AGTIME_5642	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5642
egen AGTIME_5643	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5643
egen AGTIME_5644	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5644
egen AGTIME_5645	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5645
egen AGTIME_5646	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5646
egen AGTIME_5647	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5647
egen AGTIME_5648	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5648
egen AGTIME_5649	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5649
egen AGTIME_5650	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5650
egen AGTIME_5651	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5651
egen AGTIME_5652	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5652
egen AGTIME_5653	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5653
egen AGTIME_5654	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5654
egen AGTIME_5655	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5655
egen AGTIME_5656	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5656
egen AGTIME_5657	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5657
egen AGTIME_5658	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5658
egen AGTIME_5659	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5659
egen AGTIME_5660	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5660
egen AGTIME_5661	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5661
egen AGTIME_5662	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5662
egen AGTIME_5663	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5663
egen AGTIME_5664	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5664
egen AGTIME_5665	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5665
egen AGTIME_5666	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5666
egen AGTIME_5667	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5667
egen AGTIME_5668	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5668
egen AGTIME_5669	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5669
egen AGTIME_5670	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5670
egen AGTIME_5671	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5671
egen AGTIME_5672	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5672
egen AGTIME_5673	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5673
egen AGTIME_5674	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5674
egen AGTIME_5675	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5675
egen AGTIME_5676	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5676
egen AGTIME_5677	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5677
egen AGTIME_5678	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5678
egen AGTIME_5679	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5679
egen AGTIME_5680	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5680
egen AGTIME_5681	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5681
egen AGTIME_5682	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5682
egen AGTIME_5683	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5683
egen AGTIME_5684	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5684
egen AGTIME_5685	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5685
egen AGTIME_5686	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5686
egen AGTIME_5687	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5687
egen AGTIME_5688	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5688
egen AGTIME_5689	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5689
egen AGTIME_5690	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5690
egen AGTIME_5691	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5691
egen AGTIME_5692	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5692
egen AGTIME_5693	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5693
egen AGTIME_5694	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5694
egen AGTIME_5695	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5695
egen AGTIME_5696	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5696
egen AGTIME_5697	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5697
egen AGTIME_5698	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5698
egen AGTIME_5699	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5699
egen AGTIME_5700	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5700
egen AGTIME_5701	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5701
egen AGTIME_5702	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5702
egen AGTIME_5703	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5703
egen AGTIME_5704	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5704
egen AGTIME_5705	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5705
egen AGTIME_5706	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5706
egen AGTIME_5707	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5707
egen AGTIME_5708	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5708
egen AGTIME_5709	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5709
egen AGTIME_5710	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5710
egen AGTIME_5711	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5711
egen AGTIME_5712	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5712
egen AGTIME_5713	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5713
egen AGTIME_5714	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5714
egen AGTIME_5715	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5715
egen AGTIME_5716	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5716
egen AGTIME_5717	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5717
egen AGTIME_5718	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5718
egen AGTIME_5719	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5719
egen AGTIME_5720	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5720
egen AGTIME_5721	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5721
egen AGTIME_5722	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5722
egen AGTIME_5723	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5723
egen AGTIME_5724	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5724
egen AGTIME_5725	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5725
egen AGTIME_5726	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5726
egen AGTIME_5727	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5727
egen AGTIME_5728	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5728
egen AGTIME_5729	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5729
egen AGTIME_5730	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5730
egen AGTIME_5731	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5731
egen AGTIME_5732	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5732
egen AGTIME_5733	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5733
egen AGTIME_5734	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5734
egen AGTIME_5735	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5735
egen AGTIME_5736	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5736
egen AGTIME_5737	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5737
egen AGTIME_5738	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5738
egen AGTIME_5739	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5739
egen AGTIME_5740	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5740
egen AGTIME_5741	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5741
egen AGTIME_5742	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5742
egen AGTIME_5743	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5743
egen AGTIME_5744	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5744
egen AGTIME_5745	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5745
egen AGTIME_5746	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5746
egen AGTIME_5747	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5747
egen AGTIME_5748	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5748
egen AGTIME_5749	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5749
egen AGTIME_5750	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5750
egen AGTIME_5751	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5751
egen AGTIME_5752	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5752
egen AGTIME_5753	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5753
egen AGTIME_5754	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5754
egen AGTIME_5755	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5755
egen AGTIME_5756	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5756
egen AGTIME_5757	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5757
egen AGTIME_5758	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5758
egen AGTIME_5759	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5759
egen AGTIME_5760	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5760
egen AGTIME_5761	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5761
egen AGTIME_5762	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5762
egen AGTIME_5763	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5763
egen AGTIME_5764	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5764
egen AGTIME_5765	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5765
egen AGTIME_5766	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5766
egen AGTIME_5767	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5767
egen AGTIME_5768	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5768
egen AGTIME_5769	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5769
egen AGTIME_5770	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5770
egen AGTIME_5771	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5771
egen AGTIME_5772	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5772
egen AGTIME_5773	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5773
egen AGTIME_5774	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5774
egen AGTIME_5775	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5775
egen AGTIME_5776	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5776
egen AGTIME_5777	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5777
egen AGTIME_5778	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5778
egen AGTIME_5779	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5779
egen AGTIME_5780	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5780
egen AGTIME_5781	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5781
egen AGTIME_5782	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5782
egen AGTIME_5783	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5783
egen AGTIME_5784	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5784
egen AGTIME_5785	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5785
egen AGTIME_5786	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5786
egen AGTIME_5787	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5787
egen AGTIME_5788	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5788
egen AGTIME_5789	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5789
egen AGTIME_5790	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5790
egen AGTIME_5791	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5791
egen AGTIME_5792	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5792
egen AGTIME_5793	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5793
egen AGTIME_5794	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5794
egen AGTIME_5795	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5795
egen AGTIME_5796	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5796
egen AGTIME_5797	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5797
egen AGTIME_5798	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5798
egen AGTIME_5799	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5799
egen AGTIME_5800	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5800
egen AGTIME_5801	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5801
egen AGTIME_5802	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5802
egen AGTIME_5803	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5803
egen AGTIME_5804	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5804
egen AGTIME_5805	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5805
egen AGTIME_5806	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5806
egen AGTIME_5807	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5807
egen AGTIME_5808	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5808
egen AGTIME_5809	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5809
egen AGTIME_5810	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5810
egen AGTIME_5811	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5811
egen AGTIME_5812	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5812
egen AGTIME_5813	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5813
egen AGTIME_5814	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5814
egen AGTIME_5815	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5815
egen AGTIME_5816	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5816
egen AGTIME_5817	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5817
egen AGTIME_5818	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5818
egen AGTIME_5819	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5819
egen AGTIME_5820	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5820
egen AGTIME_5821	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5821
egen AGTIME_5822	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5822
egen AGTIME_5823	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5823
egen AGTIME_5824	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5824
egen AGTIME_5825	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5825
egen AGTIME_5826	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5826
egen AGTIME_5827	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5827
egen AGTIME_5828	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5828
egen AGTIME_5829	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5829
egen AGTIME_5830	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5830
egen AGTIME_5831	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5831
egen AGTIME_5832	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5832
egen AGTIME_5833	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5833
egen AGTIME_5834	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5834
egen AGTIME_5835	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5835
egen AGTIME_5836	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5836
egen AGTIME_5837	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5837
egen AGTIME_5838	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5838
egen AGTIME_5839	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5839
egen AGTIME_5840	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5840
egen AGTIME_5841	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5841
egen AGTIME_5842	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5842
egen AGTIME_5843	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5843
egen AGTIME_5844	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5844
egen AGTIME_5845	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5845
egen AGTIME_5846	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5846
egen AGTIME_5847	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5847
egen AGTIME_5848	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5848
egen AGTIME_5849	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5849
egen AGTIME_5850	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5850
egen AGTIME_5851	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5851
egen AGTIME_5852	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5852
egen AGTIME_5853	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5853
egen AGTIME_5854	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5854
egen AGTIME_5855	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5855
egen AGTIME_5856	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5856
egen AGTIME_5857	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5857
egen AGTIME_5858	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5858
egen AGTIME_5859	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5859
egen AGTIME_5860	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5860
egen AGTIME_5861	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5861
egen AGTIME_5862	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5862
egen AGTIME_5863	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5863
egen AGTIME_5864	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5864
egen AGTIME_5865	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5865
egen AGTIME_5866	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5866
egen AGTIME_5867	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5867
egen AGTIME_5868	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5868
egen AGTIME_5869	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5869
egen AGTIME_5870	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5870
egen AGTIME_5871	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5871
egen AGTIME_5872	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5872
egen AGTIME_5873	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5873
egen AGTIME_5874	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5874
egen AGTIME_5875	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5875
egen AGTIME_5876	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5876
egen AGTIME_5877	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5877
egen AGTIME_5878	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5878
egen AGTIME_5879	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5879
egen AGTIME_5880	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5880
egen AGTIME_5881	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5881
egen AGTIME_5882	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5882
egen AGTIME_5883	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5883
egen AGTIME_5884	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5884
egen AGTIME_5885	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5885
egen AGTIME_5886	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5886
egen AGTIME_5887	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5887
egen AGTIME_5888	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5888
egen AGTIME_5889	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5889
egen AGTIME_5890	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5890
egen AGTIME_5891	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5891
egen AGTIME_5892	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5892
egen AGTIME_5893	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5893
egen AGTIME_5894	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5894
egen AGTIME_5895	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5895
egen AGTIME_5896	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5896
egen AGTIME_5897	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5897
egen AGTIME_5898	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5898
egen AGTIME_5899	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5899
egen AGTIME_5900	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5900
egen AGTIME_5901	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5901
egen AGTIME_5902	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5902
egen AGTIME_5903	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5903
egen AGTIME_5904	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5904
egen AGTIME_5905	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5905
egen AGTIME_5906	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5906
egen AGTIME_5907	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5907
egen AGTIME_5908	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5908
egen AGTIME_5909	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5909
egen AGTIME_5910	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5910
egen AGTIME_5911	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5911
egen AGTIME_5912	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5912
egen AGTIME_5913	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5913
egen AGTIME_5914	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5914
egen AGTIME_5915	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5915
egen AGTIME_5916	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5916
egen AGTIME_5917	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5917
egen AGTIME_5918	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5918
egen AGTIME_5919	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5919
egen AGTIME_5920	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5920
egen AGTIME_5921	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5921
egen AGTIME_5922	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5922
egen AGTIME_5923	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5923
egen AGTIME_5924	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5924
egen AGTIME_5925	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5925
egen AGTIME_5926	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5926
egen AGTIME_5927	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5927
egen AGTIME_5928	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5928
egen AGTIME_5929	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5929
egen AGTIME_5930	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5930
egen AGTIME_5931	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5931
egen AGTIME_5932	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5932
egen AGTIME_5933	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5933
egen AGTIME_5934	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5934
egen AGTIME_5935	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5935
egen AGTIME_5936	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5936
egen AGTIME_5937	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5937
egen AGTIME_5938	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5938
egen AGTIME_5939	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5939
egen AGTIME_5940	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5940
egen AGTIME_5941	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5941
egen AGTIME_5942	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5942
egen AGTIME_5943	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5943
egen AGTIME_5944	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5944
egen AGTIME_5945	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5945
egen AGTIME_5946	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5946
egen AGTIME_5947	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5947
egen AGTIME_5948	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5948
egen AGTIME_5949	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5949
egen AGTIME_5950	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5950
egen AGTIME_5951	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5951
egen AGTIME_5952	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5952
egen AGTIME_5953	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5953
egen AGTIME_5954	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5954
egen AGTIME_5955	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5955
egen AGTIME_5956	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5956
egen AGTIME_5957	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5957
egen AGTIME_5958	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5958
egen AGTIME_5959	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5959
egen AGTIME_5960	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5960
egen AGTIME_5961	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5961
egen AGTIME_5962	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5962
egen AGTIME_5963	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5963
egen AGTIME_5964	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5964
egen AGTIME_5965	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5965
egen AGTIME_5966	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5966
egen AGTIME_5967	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5967
egen AGTIME_5968	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5968
egen AGTIME_5969	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5969
egen AGTIME_5970	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5970
egen AGTIME_5971	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5971
egen AGTIME_5972	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5972
egen AGTIME_5973	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5973
egen AGTIME_5974	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5974
egen AGTIME_5975	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5975
egen AGTIME_5976	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5976
egen AGTIME_5977	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5977
egen AGTIME_5978	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5978
egen AGTIME_5979	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5979
egen AGTIME_5980	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5980
egen AGTIME_5981	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5981
egen AGTIME_5982	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5982
egen AGTIME_5983	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5983
egen AGTIME_5984	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5984
egen AGTIME_5985	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5985
egen AGTIME_5986	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5986
egen AGTIME_5987	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5987
egen AGTIME_5988	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5988
egen AGTIME_5989	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5989
egen AGTIME_5990	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5990
egen AGTIME_5991	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5991
egen AGTIME_5992	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5992
egen AGTIME_5993	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5993
egen AGTIME_5994	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5994
egen AGTIME_5995	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5995
egen AGTIME_5996	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5996
egen AGTIME_5997	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5997
egen AGTIME_5998	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5998
egen AGTIME_5999	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 5999
egen AGTIME_6000	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6000

save "C:\NAMED_DIRECTORY\1033_StateQTRData_2014_2023.dta", replace
clear

**REPLACE AND DROP 5501-6000
use "C:\NAMED_DIRECTORY\1033_StateQTRData_2014_2023.dta"
replace AGTIME_ID =	AGTIME_5501	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5502	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5503	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5504	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5505	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5506	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5507	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5508	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5509	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5510	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5511	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5512	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5513	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5514	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5515	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5516	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5517	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5518	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5519	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5520	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5521	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5522	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5523	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5524	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5525	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5526	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5527	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5528	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5529	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5530	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5531	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5532	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5533	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5534	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5535	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5536	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5537	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5538	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5539	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5540	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5541	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5542	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5543	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5544	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5545	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5546	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5547	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5548	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5549	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5550	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5551	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5552	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5553	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5554	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5555	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5556	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5557	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5558	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5559	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5560	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5561	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5562	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5563	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5564	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5565	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5566	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5567	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5568	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5569	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5570	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5571	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5572	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5573	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5574	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5575	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5576	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5577	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5578	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5579	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5580	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5581	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5582	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5583	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5584	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5585	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5586	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5587	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5588	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5589	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5590	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5591	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5592	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5593	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5594	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5595	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5596	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5597	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5598	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5599	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5600	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5601	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5602	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5603	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5604	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5605	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5606	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5607	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5608	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5609	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5610	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5611	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5612	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5613	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5614	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5615	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5616	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5617	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5618	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5619	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5620	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5621	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5622	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5623	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5624	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5625	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5626	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5627	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5628	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5629	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5630	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5631	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5632	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5633	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5634	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5635	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5636	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5637	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5638	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5639	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5640	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5641	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5642	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5643	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5644	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5645	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5646	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5647	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5648	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5649	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5650	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5651	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5652	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5653	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5654	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5655	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5656	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5657	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5658	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5659	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5660	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5661	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5662	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5663	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5664	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5665	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5666	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5667	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5668	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5669	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5670	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5671	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5672	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5673	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5674	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5675	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5676	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5677	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5678	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5679	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5680	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5681	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5682	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5683	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5684	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5685	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5686	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5687	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5688	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5689	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5690	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5691	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5692	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5693	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5694	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5695	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5696	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5697	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5698	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5699	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5700	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5701	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5702	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5703	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5704	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5705	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5706	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5707	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5708	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5709	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5710	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5711	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5712	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5713	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5714	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5715	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5716	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5717	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5718	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5719	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5720	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5721	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5722	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5723	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5724	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5725	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5726	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5727	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5728	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5729	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5730	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5731	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5732	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5733	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5734	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5735	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5736	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5737	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5738	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5739	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5740	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5741	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5742	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5743	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5744	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5745	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5746	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5747	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5748	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5749	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5750	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5751	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5752	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5753	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5754	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5755	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5756	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5757	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5758	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5759	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5760	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5761	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5762	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5763	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5764	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5765	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5766	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5767	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5768	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5769	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5770	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5771	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5772	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5773	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5774	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5775	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5776	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5777	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5778	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5779	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5780	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5781	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5782	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5783	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5784	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5785	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5786	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5787	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5788	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5789	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5790	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5791	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5792	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5793	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5794	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5795	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5796	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5797	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5798	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5799	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5800	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5801	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5802	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5803	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5804	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5805	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5806	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5807	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5808	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5809	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5810	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5811	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5812	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5813	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5814	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5815	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5816	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5817	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5818	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5819	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5820	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5821	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5822	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5823	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5824	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5825	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5826	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5827	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5828	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5829	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5830	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5831	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5832	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5833	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5834	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5835	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5836	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5837	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5838	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5839	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5840	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5841	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5842	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5843	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5844	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5845	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5846	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5847	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5848	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5849	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5850	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5851	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5852	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5853	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5854	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5855	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5856	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5857	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5858	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5859	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5860	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5861	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5862	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5863	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5864	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5865	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5866	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5867	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5868	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5869	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5870	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5871	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5872	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5873	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5874	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5875	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5876	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5877	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5878	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5879	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5880	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5881	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5882	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5883	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5884	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5885	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5886	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5887	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5888	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5889	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5890	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5891	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5892	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5893	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5894	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5895	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5896	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5897	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5898	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5899	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5900	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5901	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5902	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5903	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5904	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5905	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5906	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5907	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5908	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5909	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5910	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5911	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5912	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5913	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5914	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5915	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5916	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5917	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5918	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5919	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5920	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5921	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5922	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5923	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5924	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5925	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5926	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5927	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5928	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5929	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5930	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5931	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5932	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5933	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5934	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5935	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5936	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5937	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5938	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5939	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5940	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5941	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5942	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5943	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5944	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5945	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5946	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5947	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5948	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5949	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5950	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5951	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5952	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5953	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5954	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5955	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5956	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5957	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5958	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5959	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5960	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5961	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5962	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5963	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5964	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5965	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5966	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5967	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5968	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5969	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5970	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5971	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5972	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5973	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5974	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5975	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5976	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5977	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5978	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5979	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5980	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5981	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5982	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5983	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5984	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5985	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5986	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5987	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5988	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5989	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5990	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5991	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5992	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5993	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5994	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5995	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5996	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5997	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5998	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_5999	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6000	if AGTIME_ID == .

drop AGTIME_5501-AGTIME_6000

save "C:\NAMED_DIRECTORY\1033_StateQTRData_2014_2023.dta", replace
clear

**VARIABLE BLOCK 6001-6500
use "C:\NAMED_DIRECTORY\1033_StateQTRData_2014_2023.dta"
egen AGTIME_6001	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6001
egen AGTIME_6002	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6002
egen AGTIME_6003	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6003
egen AGTIME_6004	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6004
egen AGTIME_6005	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6005
egen AGTIME_6006	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6006
egen AGTIME_6007	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6007
egen AGTIME_6008	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6008
egen AGTIME_6009	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6009
egen AGTIME_6010	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6010
egen AGTIME_6011	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6011
egen AGTIME_6012	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6012
egen AGTIME_6013	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6013
egen AGTIME_6014	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6014
egen AGTIME_6015	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6015
egen AGTIME_6016	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6016
egen AGTIME_6017	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6017
egen AGTIME_6018	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6018
egen AGTIME_6019	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6019
egen AGTIME_6020	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6020
egen AGTIME_6021	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6021
egen AGTIME_6022	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6022
egen AGTIME_6023	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6023
egen AGTIME_6024	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6024
egen AGTIME_6025	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6025
egen AGTIME_6026	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6026
egen AGTIME_6027	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6027
egen AGTIME_6028	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6028
egen AGTIME_6029	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6029
egen AGTIME_6030	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6030
egen AGTIME_6031	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6031
egen AGTIME_6032	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6032
egen AGTIME_6033	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6033
egen AGTIME_6034	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6034
egen AGTIME_6035	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6035
egen AGTIME_6036	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6036
egen AGTIME_6037	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6037
egen AGTIME_6038	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6038
egen AGTIME_6039	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6039
egen AGTIME_6040	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6040
egen AGTIME_6041	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6041
egen AGTIME_6042	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6042
egen AGTIME_6043	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6043
egen AGTIME_6044	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6044
egen AGTIME_6045	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6045
egen AGTIME_6046	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6046
egen AGTIME_6047	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6047
egen AGTIME_6048	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6048
egen AGTIME_6049	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6049
egen AGTIME_6050	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6050
egen AGTIME_6051	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6051
egen AGTIME_6052	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6052
egen AGTIME_6053	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6053
egen AGTIME_6054	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6054
egen AGTIME_6055	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6055
egen AGTIME_6056	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6056
egen AGTIME_6057	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6057
egen AGTIME_6058	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6058
egen AGTIME_6059	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6059
egen AGTIME_6060	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6060
egen AGTIME_6061	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6061
egen AGTIME_6062	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6062
egen AGTIME_6063	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6063
egen AGTIME_6064	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6064
egen AGTIME_6065	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6065
egen AGTIME_6066	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6066
egen AGTIME_6067	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6067
egen AGTIME_6068	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6068
egen AGTIME_6069	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6069
egen AGTIME_6070	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6070
egen AGTIME_6071	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6071
egen AGTIME_6072	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6072
egen AGTIME_6073	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6073
egen AGTIME_6074	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6074
egen AGTIME_6075	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6075
egen AGTIME_6076	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6076
egen AGTIME_6077	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6077
egen AGTIME_6078	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6078
egen AGTIME_6079	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6079
egen AGTIME_6080	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6080
egen AGTIME_6081	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6081
egen AGTIME_6082	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6082
egen AGTIME_6083	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6083
egen AGTIME_6084	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6084
egen AGTIME_6085	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6085
egen AGTIME_6086	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6086
egen AGTIME_6087	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6087
egen AGTIME_6088	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6088
egen AGTIME_6089	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6089
egen AGTIME_6090	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6090
egen AGTIME_6091	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6091
egen AGTIME_6092	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6092
egen AGTIME_6093	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6093
egen AGTIME_6094	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6094
egen AGTIME_6095	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6095
egen AGTIME_6096	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6096
egen AGTIME_6097	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6097
egen AGTIME_6098	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6098
egen AGTIME_6099	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6099
egen AGTIME_6100	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6100
egen AGTIME_6101	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6101
egen AGTIME_6102	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6102
egen AGTIME_6103	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6103
egen AGTIME_6104	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6104
egen AGTIME_6105	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6105
egen AGTIME_6106	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6106
egen AGTIME_6107	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6107
egen AGTIME_6108	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6108
egen AGTIME_6109	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6109
egen AGTIME_6110	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6110
egen AGTIME_6111	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6111
egen AGTIME_6112	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6112
egen AGTIME_6113	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6113
egen AGTIME_6114	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6114
egen AGTIME_6115	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6115
egen AGTIME_6116	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6116
egen AGTIME_6117	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6117
egen AGTIME_6118	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6118
egen AGTIME_6119	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6119
egen AGTIME_6120	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6120
egen AGTIME_6121	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6121
egen AGTIME_6122	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6122
egen AGTIME_6123	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6123
egen AGTIME_6124	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6124
egen AGTIME_6125	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6125
egen AGTIME_6126	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6126
egen AGTIME_6127	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6127
egen AGTIME_6128	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6128
egen AGTIME_6129	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6129
egen AGTIME_6130	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6130
egen AGTIME_6131	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6131
egen AGTIME_6132	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6132
egen AGTIME_6133	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6133
egen AGTIME_6134	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6134
egen AGTIME_6135	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6135
egen AGTIME_6136	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6136
egen AGTIME_6137	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6137
egen AGTIME_6138	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6138
egen AGTIME_6139	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6139
egen AGTIME_6140	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6140
egen AGTIME_6141	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6141
egen AGTIME_6142	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6142
egen AGTIME_6143	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6143
egen AGTIME_6144	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6144
egen AGTIME_6145	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6145
egen AGTIME_6146	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6146
egen AGTIME_6147	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6147
egen AGTIME_6148	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6148
egen AGTIME_6149	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6149
egen AGTIME_6150	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6150
egen AGTIME_6151	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6151
egen AGTIME_6152	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6152
egen AGTIME_6153	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6153
egen AGTIME_6154	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6154
egen AGTIME_6155	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6155
egen AGTIME_6156	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6156
egen AGTIME_6157	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6157
egen AGTIME_6158	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6158
egen AGTIME_6159	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6159
egen AGTIME_6160	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6160
egen AGTIME_6161	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6161
egen AGTIME_6162	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6162
egen AGTIME_6163	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6163
egen AGTIME_6164	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6164
egen AGTIME_6165	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6165
egen AGTIME_6166	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6166
egen AGTIME_6167	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6167
egen AGTIME_6168	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6168
egen AGTIME_6169	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6169
egen AGTIME_6170	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6170
egen AGTIME_6171	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6171
egen AGTIME_6172	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6172
egen AGTIME_6173	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6173
egen AGTIME_6174	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6174
egen AGTIME_6175	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6175
egen AGTIME_6176	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6176
egen AGTIME_6177	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6177
egen AGTIME_6178	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6178
egen AGTIME_6179	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6179
egen AGTIME_6180	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6180
egen AGTIME_6181	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6181
egen AGTIME_6182	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6182
egen AGTIME_6183	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6183
egen AGTIME_6184	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6184
egen AGTIME_6185	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6185
egen AGTIME_6186	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6186
egen AGTIME_6187	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6187
egen AGTIME_6188	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6188
egen AGTIME_6189	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6189
egen AGTIME_6190	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6190
egen AGTIME_6191	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6191
egen AGTIME_6192	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6192
egen AGTIME_6193	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6193
egen AGTIME_6194	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6194
egen AGTIME_6195	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6195
egen AGTIME_6196	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6196
egen AGTIME_6197	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6197
egen AGTIME_6198	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6198
egen AGTIME_6199	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6199
egen AGTIME_6200	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6200
egen AGTIME_6201	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6201
egen AGTIME_6202	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6202
egen AGTIME_6203	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6203
egen AGTIME_6204	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6204
egen AGTIME_6205	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6205
egen AGTIME_6206	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6206
egen AGTIME_6207	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6207
egen AGTIME_6208	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6208
egen AGTIME_6209	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6209
egen AGTIME_6210	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6210
egen AGTIME_6211	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6211
egen AGTIME_6212	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6212
egen AGTIME_6213	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6213
egen AGTIME_6214	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6214
egen AGTIME_6215	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6215
egen AGTIME_6216	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6216
egen AGTIME_6217	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6217
egen AGTIME_6218	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6218
egen AGTIME_6219	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6219
egen AGTIME_6220	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6220
egen AGTIME_6221	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6221
egen AGTIME_6222	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6222
egen AGTIME_6223	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6223
egen AGTIME_6224	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6224
egen AGTIME_6225	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6225
egen AGTIME_6226	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6226
egen AGTIME_6227	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6227
egen AGTIME_6228	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6228
egen AGTIME_6229	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6229
egen AGTIME_6230	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6230
egen AGTIME_6231	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6231
egen AGTIME_6232	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6232
egen AGTIME_6233	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6233
egen AGTIME_6234	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6234
egen AGTIME_6235	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6235
egen AGTIME_6236	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6236
egen AGTIME_6237	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6237
egen AGTIME_6238	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6238
egen AGTIME_6239	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6239
egen AGTIME_6240	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6240
egen AGTIME_6241	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6241
egen AGTIME_6242	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6242
egen AGTIME_6243	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6243
egen AGTIME_6244	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6244
egen AGTIME_6245	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6245
egen AGTIME_6246	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6246
egen AGTIME_6247	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6247
egen AGTIME_6248	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6248
egen AGTIME_6249	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6249
egen AGTIME_6250	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6250
egen AGTIME_6251	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6251
egen AGTIME_6252	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6252
egen AGTIME_6253	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6253
egen AGTIME_6254	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6254
egen AGTIME_6255	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6255
egen AGTIME_6256	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6256
egen AGTIME_6257	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6257
egen AGTIME_6258	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6258
egen AGTIME_6259	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6259
egen AGTIME_6260	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6260
egen AGTIME_6261	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6261
egen AGTIME_6262	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6262
egen AGTIME_6263	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6263
egen AGTIME_6264	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6264
egen AGTIME_6265	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6265
egen AGTIME_6266	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6266
egen AGTIME_6267	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6267
egen AGTIME_6268	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6268
egen AGTIME_6269	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6269
egen AGTIME_6270	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6270
egen AGTIME_6271	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6271
egen AGTIME_6272	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6272
egen AGTIME_6273	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6273
egen AGTIME_6274	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6274
egen AGTIME_6275	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6275
egen AGTIME_6276	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6276
egen AGTIME_6277	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6277
egen AGTIME_6278	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6278
egen AGTIME_6279	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6279
egen AGTIME_6280	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6280
egen AGTIME_6281	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6281
egen AGTIME_6282	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6282
egen AGTIME_6283	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6283
egen AGTIME_6284	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6284
egen AGTIME_6285	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6285
egen AGTIME_6286	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6286
egen AGTIME_6287	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6287
egen AGTIME_6288	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6288
egen AGTIME_6289	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6289
egen AGTIME_6290	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6290
egen AGTIME_6291	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6291
egen AGTIME_6292	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6292
egen AGTIME_6293	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6293
egen AGTIME_6294	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6294
egen AGTIME_6295	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6295
egen AGTIME_6296	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6296
egen AGTIME_6297	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6297
egen AGTIME_6298	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6298
egen AGTIME_6299	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6299
egen AGTIME_6300	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6300
egen AGTIME_6301	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6301
egen AGTIME_6302	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6302
egen AGTIME_6303	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6303
egen AGTIME_6304	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6304
egen AGTIME_6305	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6305
egen AGTIME_6306	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6306
egen AGTIME_6307	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6307
egen AGTIME_6308	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6308
egen AGTIME_6309	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6309
egen AGTIME_6310	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6310
egen AGTIME_6311	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6311
egen AGTIME_6312	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6312
egen AGTIME_6313	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6313
egen AGTIME_6314	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6314
egen AGTIME_6315	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6315
egen AGTIME_6316	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6316
egen AGTIME_6317	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6317
egen AGTIME_6318	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6318
egen AGTIME_6319	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6319
egen AGTIME_6320	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6320
egen AGTIME_6321	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6321
egen AGTIME_6322	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6322
egen AGTIME_6323	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6323
egen AGTIME_6324	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6324
egen AGTIME_6325	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6325
egen AGTIME_6326	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6326
egen AGTIME_6327	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6327
egen AGTIME_6328	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6328
egen AGTIME_6329	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6329
egen AGTIME_6330	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6330
egen AGTIME_6331	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6331
egen AGTIME_6332	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6332
egen AGTIME_6333	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6333
egen AGTIME_6334	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6334
egen AGTIME_6335	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6335
egen AGTIME_6336	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6336
egen AGTIME_6337	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6337
egen AGTIME_6338	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6338
egen AGTIME_6339	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6339
egen AGTIME_6340	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6340
egen AGTIME_6341	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6341
egen AGTIME_6342	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6342
egen AGTIME_6343	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6343
egen AGTIME_6344	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6344
egen AGTIME_6345	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6345
egen AGTIME_6346	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6346
egen AGTIME_6347	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6347
egen AGTIME_6348	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6348
egen AGTIME_6349	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6349
egen AGTIME_6350	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6350
egen AGTIME_6351	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6351
egen AGTIME_6352	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6352
egen AGTIME_6353	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6353
egen AGTIME_6354	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6354
egen AGTIME_6355	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6355
egen AGTIME_6356	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6356
egen AGTIME_6357	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6357
egen AGTIME_6358	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6358
egen AGTIME_6359	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6359
egen AGTIME_6360	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6360
egen AGTIME_6361	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6361
egen AGTIME_6362	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6362
egen AGTIME_6363	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6363
egen AGTIME_6364	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6364
egen AGTIME_6365	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6365
egen AGTIME_6366	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6366
egen AGTIME_6367	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6367
egen AGTIME_6368	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6368
egen AGTIME_6369	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6369
egen AGTIME_6370	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6370
egen AGTIME_6371	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6371
egen AGTIME_6372	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6372
egen AGTIME_6373	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6373
egen AGTIME_6374	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6374
egen AGTIME_6375	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6375
egen AGTIME_6376	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6376
egen AGTIME_6377	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6377
egen AGTIME_6378	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6378
egen AGTIME_6379	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6379
egen AGTIME_6380	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6380
egen AGTIME_6381	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6381
egen AGTIME_6382	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6382
egen AGTIME_6383	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6383
egen AGTIME_6384	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6384
egen AGTIME_6385	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6385
egen AGTIME_6386	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6386
egen AGTIME_6387	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6387
egen AGTIME_6388	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6388
egen AGTIME_6389	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6389
egen AGTIME_6390	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6390
egen AGTIME_6391	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6391
egen AGTIME_6392	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6392
egen AGTIME_6393	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6393
egen AGTIME_6394	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6394
egen AGTIME_6395	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6395
egen AGTIME_6396	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6396
egen AGTIME_6397	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6397
egen AGTIME_6398	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6398
egen AGTIME_6399	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6399
egen AGTIME_6400	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6400
egen AGTIME_6401	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6401
egen AGTIME_6402	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6402
egen AGTIME_6403	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6403
egen AGTIME_6404	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6404
egen AGTIME_6405	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6405
egen AGTIME_6406	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6406
egen AGTIME_6407	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6407
egen AGTIME_6408	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6408
egen AGTIME_6409	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6409
egen AGTIME_6410	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6410
egen AGTIME_6411	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6411
egen AGTIME_6412	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6412
egen AGTIME_6413	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6413
egen AGTIME_6414	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6414
egen AGTIME_6415	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6415
egen AGTIME_6416	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6416
egen AGTIME_6417	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6417
egen AGTIME_6418	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6418
egen AGTIME_6419	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6419
egen AGTIME_6420	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6420
egen AGTIME_6421	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6421
egen AGTIME_6422	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6422
egen AGTIME_6423	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6423
egen AGTIME_6424	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6424
egen AGTIME_6425	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6425
egen AGTIME_6426	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6426
egen AGTIME_6427	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6427
egen AGTIME_6428	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6428
egen AGTIME_6429	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6429
egen AGTIME_6430	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6430
egen AGTIME_6431	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6431
egen AGTIME_6432	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6432
egen AGTIME_6433	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6433
egen AGTIME_6434	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6434
egen AGTIME_6435	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6435
egen AGTIME_6436	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6436
egen AGTIME_6437	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6437
egen AGTIME_6438	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6438
egen AGTIME_6439	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6439
egen AGTIME_6440	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6440
egen AGTIME_6441	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6441
egen AGTIME_6442	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6442
egen AGTIME_6443	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6443
egen AGTIME_6444	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6444
egen AGTIME_6445	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6445
egen AGTIME_6446	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6446
egen AGTIME_6447	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6447
egen AGTIME_6448	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6448
egen AGTIME_6449	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6449
egen AGTIME_6450	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6450
egen AGTIME_6451	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6451
egen AGTIME_6452	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6452
egen AGTIME_6453	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6453
egen AGTIME_6454	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6454
egen AGTIME_6455	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6455
egen AGTIME_6456	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6456
egen AGTIME_6457	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6457
egen AGTIME_6458	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6458
egen AGTIME_6459	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6459
egen AGTIME_6460	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6460
egen AGTIME_6461	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6461
egen AGTIME_6462	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6462
egen AGTIME_6463	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6463
egen AGTIME_6464	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6464
egen AGTIME_6465	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6465
egen AGTIME_6466	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6466
egen AGTIME_6467	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6467
egen AGTIME_6468	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6468
egen AGTIME_6469	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6469
egen AGTIME_6470	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6470
egen AGTIME_6471	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6471
egen AGTIME_6472	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6472
egen AGTIME_6473	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6473
egen AGTIME_6474	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6474
egen AGTIME_6475	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6475
egen AGTIME_6476	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6476
egen AGTIME_6477	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6477
egen AGTIME_6478	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6478
egen AGTIME_6479	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6479
egen AGTIME_6480	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6480
egen AGTIME_6481	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6481
egen AGTIME_6482	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6482
egen AGTIME_6483	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6483
egen AGTIME_6484	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6484
egen AGTIME_6485	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6485
egen AGTIME_6486	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6486
egen AGTIME_6487	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6487
egen AGTIME_6488	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6488
egen AGTIME_6489	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6489
egen AGTIME_6490	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6490
egen AGTIME_6491	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6491
egen AGTIME_6492	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6492
egen AGTIME_6493	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6493
egen AGTIME_6494	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6494
egen AGTIME_6495	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6495
egen AGTIME_6496	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6496
egen AGTIME_6497	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6497
egen AGTIME_6498	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6498
egen AGTIME_6499	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6499
egen AGTIME_6500	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6500

save "C:\NAMED_DIRECTORY\1033_StateQTRData_2014_2023.dta", replace
clear

**REPLACE AND DROP 6001-6500
use "C:\NAMED_DIRECTORY\1033_StateQTRData_2014_2023.dta"
replace AGTIME_ID =	AGTIME_6001	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6002	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6003	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6004	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6005	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6006	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6007	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6008	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6009	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6010	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6011	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6012	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6013	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6014	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6015	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6016	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6017	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6018	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6019	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6020	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6021	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6022	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6023	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6024	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6025	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6026	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6027	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6028	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6029	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6030	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6031	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6032	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6033	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6034	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6035	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6036	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6037	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6038	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6039	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6040	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6041	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6042	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6043	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6044	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6045	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6046	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6047	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6048	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6049	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6050	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6051	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6052	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6053	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6054	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6055	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6056	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6057	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6058	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6059	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6060	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6061	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6062	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6063	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6064	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6065	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6066	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6067	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6068	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6069	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6070	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6071	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6072	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6073	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6074	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6075	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6076	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6077	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6078	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6079	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6080	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6081	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6082	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6083	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6084	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6085	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6086	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6087	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6088	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6089	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6090	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6091	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6092	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6093	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6094	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6095	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6096	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6097	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6098	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6099	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6100	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6101	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6102	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6103	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6104	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6105	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6106	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6107	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6108	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6109	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6110	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6111	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6112	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6113	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6114	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6115	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6116	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6117	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6118	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6119	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6120	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6121	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6122	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6123	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6124	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6125	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6126	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6127	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6128	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6129	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6130	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6131	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6132	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6133	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6134	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6135	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6136	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6137	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6138	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6139	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6140	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6141	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6142	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6143	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6144	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6145	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6146	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6147	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6148	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6149	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6150	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6151	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6152	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6153	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6154	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6155	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6156	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6157	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6158	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6159	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6160	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6161	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6162	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6163	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6164	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6165	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6166	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6167	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6168	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6169	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6170	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6171	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6172	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6173	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6174	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6175	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6176	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6177	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6178	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6179	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6180	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6181	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6182	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6183	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6184	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6185	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6186	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6187	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6188	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6189	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6190	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6191	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6192	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6193	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6194	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6195	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6196	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6197	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6198	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6199	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6200	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6201	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6202	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6203	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6204	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6205	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6206	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6207	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6208	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6209	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6210	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6211	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6212	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6213	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6214	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6215	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6216	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6217	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6218	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6219	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6220	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6221	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6222	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6223	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6224	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6225	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6226	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6227	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6228	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6229	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6230	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6231	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6232	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6233	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6234	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6235	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6236	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6237	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6238	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6239	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6240	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6241	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6242	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6243	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6244	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6245	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6246	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6247	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6248	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6249	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6250	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6251	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6252	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6253	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6254	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6255	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6256	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6257	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6258	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6259	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6260	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6261	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6262	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6263	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6264	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6265	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6266	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6267	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6268	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6269	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6270	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6271	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6272	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6273	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6274	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6275	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6276	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6277	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6278	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6279	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6280	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6281	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6282	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6283	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6284	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6285	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6286	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6287	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6288	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6289	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6290	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6291	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6292	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6293	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6294	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6295	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6296	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6297	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6298	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6299	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6300	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6301	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6302	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6303	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6304	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6305	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6306	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6307	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6308	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6309	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6310	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6311	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6312	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6313	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6314	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6315	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6316	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6317	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6318	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6319	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6320	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6321	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6322	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6323	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6324	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6325	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6326	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6327	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6328	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6329	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6330	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6331	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6332	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6333	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6334	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6335	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6336	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6337	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6338	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6339	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6340	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6341	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6342	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6343	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6344	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6345	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6346	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6347	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6348	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6349	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6350	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6351	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6352	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6353	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6354	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6355	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6356	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6357	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6358	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6359	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6360	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6361	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6362	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6363	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6364	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6365	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6366	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6367	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6368	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6369	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6370	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6371	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6372	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6373	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6374	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6375	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6376	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6377	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6378	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6379	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6380	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6381	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6382	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6383	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6384	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6385	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6386	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6387	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6388	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6389	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6390	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6391	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6392	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6393	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6394	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6395	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6396	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6397	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6398	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6399	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6400	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6401	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6402	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6403	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6404	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6405	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6406	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6407	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6408	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6409	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6410	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6411	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6412	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6413	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6414	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6415	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6416	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6417	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6418	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6419	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6420	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6421	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6422	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6423	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6424	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6425	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6426	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6427	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6428	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6429	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6430	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6431	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6432	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6433	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6434	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6435	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6436	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6437	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6438	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6439	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6440	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6441	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6442	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6443	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6444	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6445	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6446	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6447	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6448	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6449	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6450	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6451	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6452	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6453	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6454	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6455	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6456	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6457	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6458	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6459	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6460	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6461	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6462	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6463	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6464	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6465	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6466	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6467	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6468	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6469	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6470	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6471	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6472	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6473	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6474	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6475	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6476	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6477	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6478	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6479	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6480	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6481	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6482	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6483	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6484	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6485	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6486	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6487	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6488	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6489	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6490	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6491	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6492	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6493	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6494	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6495	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6496	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6497	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6498	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6499	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6500	if AGTIME_ID == .

drop AGTIME_6001-AGTIME_6500

save "C:\NAMED_DIRECTORY\1033_StateQTRData_2014_2023.dta", replace
clear

**VARIABLE BLOCK 6501-7000
use "C:\NAMED_DIRECTORY\1033_StateQTRData_2014_2023.dta"
egen AGTIME_6501	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6501
egen AGTIME_6502	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6502
egen AGTIME_6503	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6503
egen AGTIME_6504	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6504
egen AGTIME_6505	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6505
egen AGTIME_6506	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6506
egen AGTIME_6507	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6507
egen AGTIME_6508	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6508
egen AGTIME_6509	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6509
egen AGTIME_6510	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6510
egen AGTIME_6511	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6511
egen AGTIME_6512	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6512
egen AGTIME_6513	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6513
egen AGTIME_6514	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6514
egen AGTIME_6515	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6515
egen AGTIME_6516	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6516
egen AGTIME_6517	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6517
egen AGTIME_6518	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6518
egen AGTIME_6519	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6519
egen AGTIME_6520	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6520
egen AGTIME_6521	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6521
egen AGTIME_6522	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6522
egen AGTIME_6523	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6523
egen AGTIME_6524	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6524
egen AGTIME_6525	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6525
egen AGTIME_6526	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6526
egen AGTIME_6527	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6527
egen AGTIME_6528	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6528
egen AGTIME_6529	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6529
egen AGTIME_6530	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6530
egen AGTIME_6531	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6531
egen AGTIME_6532	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6532
egen AGTIME_6533	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6533
egen AGTIME_6534	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6534
egen AGTIME_6535	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6535
egen AGTIME_6536	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6536
egen AGTIME_6537	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6537
egen AGTIME_6538	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6538
egen AGTIME_6539	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6539
egen AGTIME_6540	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6540
egen AGTIME_6541	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6541
egen AGTIME_6542	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6542
egen AGTIME_6543	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6543
egen AGTIME_6544	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6544
egen AGTIME_6545	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6545
egen AGTIME_6546	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6546
egen AGTIME_6547	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6547
egen AGTIME_6548	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6548
egen AGTIME_6549	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6549
egen AGTIME_6550	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6550
egen AGTIME_6551	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6551
egen AGTIME_6552	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6552
egen AGTIME_6553	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6553
egen AGTIME_6554	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6554
egen AGTIME_6555	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6555
egen AGTIME_6556	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6556
egen AGTIME_6557	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6557
egen AGTIME_6558	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6558
egen AGTIME_6559	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6559
egen AGTIME_6560	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6560
egen AGTIME_6561	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6561
egen AGTIME_6562	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6562
egen AGTIME_6563	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6563
egen AGTIME_6564	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6564
egen AGTIME_6565	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6565
egen AGTIME_6566	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6566
egen AGTIME_6567	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6567
egen AGTIME_6568	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6568
egen AGTIME_6569	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6569
egen AGTIME_6570	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6570
egen AGTIME_6571	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6571
egen AGTIME_6572	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6572
egen AGTIME_6573	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6573
egen AGTIME_6574	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6574
egen AGTIME_6575	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6575
egen AGTIME_6576	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6576
egen AGTIME_6577	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6577
egen AGTIME_6578	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6578
egen AGTIME_6579	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6579
egen AGTIME_6580	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6580
egen AGTIME_6581	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6581
egen AGTIME_6582	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6582
egen AGTIME_6583	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6583
egen AGTIME_6584	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6584
egen AGTIME_6585	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6585
egen AGTIME_6586	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6586
egen AGTIME_6587	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6587
egen AGTIME_6588	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6588
egen AGTIME_6589	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6589
egen AGTIME_6590	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6590
egen AGTIME_6591	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6591
egen AGTIME_6592	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6592
egen AGTIME_6593	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6593
egen AGTIME_6594	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6594
egen AGTIME_6595	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6595
egen AGTIME_6596	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6596
egen AGTIME_6597	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6597
egen AGTIME_6598	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6598
egen AGTIME_6599	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6599
egen AGTIME_6600	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6600
egen AGTIME_6601	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6601
egen AGTIME_6602	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6602
egen AGTIME_6603	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6603
egen AGTIME_6604	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6604
egen AGTIME_6605	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6605
egen AGTIME_6606	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6606
egen AGTIME_6607	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6607
egen AGTIME_6608	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6608
egen AGTIME_6609	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6609
egen AGTIME_6610	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6610
egen AGTIME_6611	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6611
egen AGTIME_6612	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6612
egen AGTIME_6613	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6613
egen AGTIME_6614	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6614
egen AGTIME_6615	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6615
egen AGTIME_6616	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6616
egen AGTIME_6617	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6617
egen AGTIME_6618	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6618
egen AGTIME_6619	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6619
egen AGTIME_6620	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6620
egen AGTIME_6621	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6621
egen AGTIME_6622	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6622
egen AGTIME_6623	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6623
egen AGTIME_6624	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6624
egen AGTIME_6625	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6625
egen AGTIME_6626	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6626
egen AGTIME_6627	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6627
egen AGTIME_6628	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6628
egen AGTIME_6629	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6629
egen AGTIME_6630	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6630
egen AGTIME_6631	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6631
egen AGTIME_6632	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6632
egen AGTIME_6633	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6633
egen AGTIME_6634	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6634
egen AGTIME_6635	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6635
egen AGTIME_6636	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6636
egen AGTIME_6637	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6637
egen AGTIME_6638	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6638
egen AGTIME_6639	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6639
egen AGTIME_6640	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6640
egen AGTIME_6641	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6641
egen AGTIME_6642	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6642
egen AGTIME_6643	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6643
egen AGTIME_6644	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6644
egen AGTIME_6645	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6645
egen AGTIME_6646	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6646
egen AGTIME_6647	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6647
egen AGTIME_6648	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6648
egen AGTIME_6649	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6649
egen AGTIME_6650	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6650
egen AGTIME_6651	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6651
egen AGTIME_6652	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6652
egen AGTIME_6653	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6653
egen AGTIME_6654	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6654
egen AGTIME_6655	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6655
egen AGTIME_6656	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6656
egen AGTIME_6657	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6657
egen AGTIME_6658	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6658
egen AGTIME_6659	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6659
egen AGTIME_6660	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6660
egen AGTIME_6661	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6661
egen AGTIME_6662	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6662
egen AGTIME_6663	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6663
egen AGTIME_6664	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6664
egen AGTIME_6665	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6665
egen AGTIME_6666	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6666
egen AGTIME_6667	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6667
egen AGTIME_6668	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6668
egen AGTIME_6669	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6669
egen AGTIME_6670	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6670
egen AGTIME_6671	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6671
egen AGTIME_6672	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6672
egen AGTIME_6673	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6673
egen AGTIME_6674	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6674
egen AGTIME_6675	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6675
egen AGTIME_6676	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6676
egen AGTIME_6677	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6677
egen AGTIME_6678	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6678
egen AGTIME_6679	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6679
egen AGTIME_6680	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6680
egen AGTIME_6681	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6681
egen AGTIME_6682	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6682
egen AGTIME_6683	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6683
egen AGTIME_6684	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6684
egen AGTIME_6685	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6685
egen AGTIME_6686	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6686
egen AGTIME_6687	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6687
egen AGTIME_6688	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6688
egen AGTIME_6689	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6689
egen AGTIME_6690	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6690
egen AGTIME_6691	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6691
egen AGTIME_6692	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6692
egen AGTIME_6693	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6693
egen AGTIME_6694	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6694
egen AGTIME_6695	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6695
egen AGTIME_6696	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6696
egen AGTIME_6697	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6697
egen AGTIME_6698	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6698
egen AGTIME_6699	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6699
egen AGTIME_6700	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6700
egen AGTIME_6701	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6701
egen AGTIME_6702	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6702
egen AGTIME_6703	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6703
egen AGTIME_6704	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6704
egen AGTIME_6705	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6705
egen AGTIME_6706	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6706
egen AGTIME_6707	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6707
egen AGTIME_6708	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6708
egen AGTIME_6709	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6709
egen AGTIME_6710	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6710
egen AGTIME_6711	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6711
egen AGTIME_6712	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6712
egen AGTIME_6713	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6713
egen AGTIME_6714	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6714
egen AGTIME_6715	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6715
egen AGTIME_6716	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6716
egen AGTIME_6717	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6717
egen AGTIME_6718	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6718
egen AGTIME_6719	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6719
egen AGTIME_6720	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6720
egen AGTIME_6721	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6721
egen AGTIME_6722	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6722
egen AGTIME_6723	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6723
egen AGTIME_6724	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6724
egen AGTIME_6725	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6725
egen AGTIME_6726	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6726
egen AGTIME_6727	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6727
egen AGTIME_6728	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6728
egen AGTIME_6729	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6729
egen AGTIME_6730	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6730
egen AGTIME_6731	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6731
egen AGTIME_6732	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6732
egen AGTIME_6733	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6733
egen AGTIME_6734	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6734
egen AGTIME_6735	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6735
egen AGTIME_6736	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6736
egen AGTIME_6737	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6737
egen AGTIME_6738	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6738
egen AGTIME_6739	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6739
egen AGTIME_6740	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6740
egen AGTIME_6741	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6741
egen AGTIME_6742	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6742
egen AGTIME_6743	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6743
egen AGTIME_6744	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6744
egen AGTIME_6745	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6745
egen AGTIME_6746	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6746
egen AGTIME_6747	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6747
egen AGTIME_6748	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6748
egen AGTIME_6749	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6749
egen AGTIME_6750	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6750
egen AGTIME_6751	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6751
egen AGTIME_6752	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6752
egen AGTIME_6753	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6753
egen AGTIME_6754	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6754
egen AGTIME_6755	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6755
egen AGTIME_6756	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6756
egen AGTIME_6757	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6757
egen AGTIME_6758	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6758
egen AGTIME_6759	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6759
egen AGTIME_6760	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6760
egen AGTIME_6761	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6761
egen AGTIME_6762	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6762
egen AGTIME_6763	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6763
egen AGTIME_6764	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6764
egen AGTIME_6765	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6765
egen AGTIME_6766	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6766
egen AGTIME_6767	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6767
egen AGTIME_6768	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6768
egen AGTIME_6769	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6769
egen AGTIME_6770	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6770
egen AGTIME_6771	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6771
egen AGTIME_6772	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6772
egen AGTIME_6773	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6773
egen AGTIME_6774	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6774
egen AGTIME_6775	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6775
egen AGTIME_6776	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6776
egen AGTIME_6777	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6777
egen AGTIME_6778	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6778
egen AGTIME_6779	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6779
egen AGTIME_6780	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6780
egen AGTIME_6781	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6781
egen AGTIME_6782	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6782
egen AGTIME_6783	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6783
egen AGTIME_6784	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6784
egen AGTIME_6785	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6785
egen AGTIME_6786	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6786
egen AGTIME_6787	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6787
egen AGTIME_6788	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6788
egen AGTIME_6789	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6789
egen AGTIME_6790	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6790
egen AGTIME_6791	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6791
egen AGTIME_6792	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6792
egen AGTIME_6793	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6793
egen AGTIME_6794	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6794
egen AGTIME_6795	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6795
egen AGTIME_6796	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6796
egen AGTIME_6797	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6797
egen AGTIME_6798	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6798
egen AGTIME_6799	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6799
egen AGTIME_6800	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6800
egen AGTIME_6801	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6801
egen AGTIME_6802	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6802
egen AGTIME_6803	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6803
egen AGTIME_6804	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6804
egen AGTIME_6805	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6805
egen AGTIME_6806	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6806
egen AGTIME_6807	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6807
egen AGTIME_6808	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6808
egen AGTIME_6809	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6809
egen AGTIME_6810	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6810
egen AGTIME_6811	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6811
egen AGTIME_6812	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6812
egen AGTIME_6813	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6813
egen AGTIME_6814	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6814
egen AGTIME_6815	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6815
egen AGTIME_6816	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6816
egen AGTIME_6817	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6817
egen AGTIME_6818	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6818
egen AGTIME_6819	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6819
egen AGTIME_6820	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6820
egen AGTIME_6821	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6821
egen AGTIME_6822	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6822
egen AGTIME_6823	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6823
egen AGTIME_6824	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6824
egen AGTIME_6825	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6825
egen AGTIME_6826	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6826
egen AGTIME_6827	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6827
egen AGTIME_6828	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6828
egen AGTIME_6829	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6829
egen AGTIME_6830	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6830
egen AGTIME_6831	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6831
egen AGTIME_6832	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6832
egen AGTIME_6833	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6833
egen AGTIME_6834	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6834
egen AGTIME_6835	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6835
egen AGTIME_6836	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6836
egen AGTIME_6837	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6837
egen AGTIME_6838	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6838
egen AGTIME_6839	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6839
egen AGTIME_6840	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6840
egen AGTIME_6841	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6841
egen AGTIME_6842	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6842
egen AGTIME_6843	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6843
egen AGTIME_6844	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6844
egen AGTIME_6845	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6845
egen AGTIME_6846	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6846
egen AGTIME_6847	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6847
egen AGTIME_6848	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6848
egen AGTIME_6849	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6849
egen AGTIME_6850	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6850
egen AGTIME_6851	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6851
egen AGTIME_6852	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6852
egen AGTIME_6853	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6853
egen AGTIME_6854	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6854
egen AGTIME_6855	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6855
egen AGTIME_6856	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6856
egen AGTIME_6857	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6857
egen AGTIME_6858	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6858
egen AGTIME_6859	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6859
egen AGTIME_6860	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6860
egen AGTIME_6861	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6861
egen AGTIME_6862	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6862
egen AGTIME_6863	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6863
egen AGTIME_6864	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6864
egen AGTIME_6865	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6865
egen AGTIME_6866	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6866
egen AGTIME_6867	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6867
egen AGTIME_6868	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6868
egen AGTIME_6869	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6869
egen AGTIME_6870	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6870
egen AGTIME_6871	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6871
egen AGTIME_6872	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6872
egen AGTIME_6873	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6873
egen AGTIME_6874	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6874
egen AGTIME_6875	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6875
egen AGTIME_6876	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6876
egen AGTIME_6877	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6877
egen AGTIME_6878	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6878
egen AGTIME_6879	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6879
egen AGTIME_6880	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6880
egen AGTIME_6881	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6881
egen AGTIME_6882	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6882
egen AGTIME_6883	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6883
egen AGTIME_6884	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6884
egen AGTIME_6885	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6885
egen AGTIME_6886	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6886
egen AGTIME_6887	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6887
egen AGTIME_6888	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6888
egen AGTIME_6889	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6889
egen AGTIME_6890	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6890
egen AGTIME_6891	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6891
egen AGTIME_6892	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6892
egen AGTIME_6893	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6893
egen AGTIME_6894	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6894
egen AGTIME_6895	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6895
egen AGTIME_6896	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6896
egen AGTIME_6897	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6897
egen AGTIME_6898	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6898
egen AGTIME_6899	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6899
egen AGTIME_6900	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6900
egen AGTIME_6901	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6901
egen AGTIME_6902	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6902
egen AGTIME_6903	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6903
egen AGTIME_6904	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6904
egen AGTIME_6905	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6905
egen AGTIME_6906	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6906
egen AGTIME_6907	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6907
egen AGTIME_6908	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6908
egen AGTIME_6909	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6909
egen AGTIME_6910	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6910
egen AGTIME_6911	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6911
egen AGTIME_6912	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6912
egen AGTIME_6913	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6913
egen AGTIME_6914	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6914
egen AGTIME_6915	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6915
egen AGTIME_6916	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6916
egen AGTIME_6917	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6917
egen AGTIME_6918	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6918
egen AGTIME_6919	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6919
egen AGTIME_6920	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6920
egen AGTIME_6921	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6921
egen AGTIME_6922	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6922
egen AGTIME_6923	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6923
egen AGTIME_6924	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6924
egen AGTIME_6925	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6925
egen AGTIME_6926	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6926
egen AGTIME_6927	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6927
egen AGTIME_6928	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6928
egen AGTIME_6929	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6929
egen AGTIME_6930	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6930
egen AGTIME_6931	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6931
egen AGTIME_6932	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6932
egen AGTIME_6933	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6933
egen AGTIME_6934	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6934
egen AGTIME_6935	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6935
egen AGTIME_6936	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6936
egen AGTIME_6937	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6937
egen AGTIME_6938	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6938
egen AGTIME_6939	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6939
egen AGTIME_6940	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6940
egen AGTIME_6941	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6941
egen AGTIME_6942	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6942
egen AGTIME_6943	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6943
egen AGTIME_6944	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6944
egen AGTIME_6945	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6945
egen AGTIME_6946	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6946
egen AGTIME_6947	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6947
egen AGTIME_6948	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6948
egen AGTIME_6949	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6949
egen AGTIME_6950	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6950
egen AGTIME_6951	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6951
egen AGTIME_6952	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6952
egen AGTIME_6953	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6953
egen AGTIME_6954	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6954
egen AGTIME_6955	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6955
egen AGTIME_6956	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6956
egen AGTIME_6957	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6957
egen AGTIME_6958	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6958
egen AGTIME_6959	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6959
egen AGTIME_6960	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6960
egen AGTIME_6961	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6961
egen AGTIME_6962	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6962
egen AGTIME_6963	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6963
egen AGTIME_6964	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6964
egen AGTIME_6965	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6965
egen AGTIME_6966	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6966
egen AGTIME_6967	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6967
egen AGTIME_6968	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6968
egen AGTIME_6969	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6969
egen AGTIME_6970	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6970
egen AGTIME_6971	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6971
egen AGTIME_6972	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6972
egen AGTIME_6973	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6973
egen AGTIME_6974	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6974
egen AGTIME_6975	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6975
egen AGTIME_6976	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6976
egen AGTIME_6977	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6977
egen AGTIME_6978	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6978
egen AGTIME_6979	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6979
egen AGTIME_6980	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6980
egen AGTIME_6981	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6981
egen AGTIME_6982	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6982
egen AGTIME_6983	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6983
egen AGTIME_6984	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6984
egen AGTIME_6985	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6985
egen AGTIME_6986	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6986
egen AGTIME_6987	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6987
egen AGTIME_6988	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6988
egen AGTIME_6989	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6989
egen AGTIME_6990	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6990
egen AGTIME_6991	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6991
egen AGTIME_6992	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6992
egen AGTIME_6993	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6993
egen AGTIME_6994	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6994
egen AGTIME_6995	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6995
egen AGTIME_6996	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6996
egen AGTIME_6997	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6997
egen AGTIME_6998	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6998
egen AGTIME_6999	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 6999
egen AGTIME_7000	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7000

save "C:\NAMED_DIRECTORY\1033_StateQTRData_2014_2023.dta", replace
clear

**REPLACE AND DROP 6501-7000
use "C:\NAMED_DIRECTORY\1033_StateQTRData_2014_2023.dta"
replace AGTIME_ID =	AGTIME_6501	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6502	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6503	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6504	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6505	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6506	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6507	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6508	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6509	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6510	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6511	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6512	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6513	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6514	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6515	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6516	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6517	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6518	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6519	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6520	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6521	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6522	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6523	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6524	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6525	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6526	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6527	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6528	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6529	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6530	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6531	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6532	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6533	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6534	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6535	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6536	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6537	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6538	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6539	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6540	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6541	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6542	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6543	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6544	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6545	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6546	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6547	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6548	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6549	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6550	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6551	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6552	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6553	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6554	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6555	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6556	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6557	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6558	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6559	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6560	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6561	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6562	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6563	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6564	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6565	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6566	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6567	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6568	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6569	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6570	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6571	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6572	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6573	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6574	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6575	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6576	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6577	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6578	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6579	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6580	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6581	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6582	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6583	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6584	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6585	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6586	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6587	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6588	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6589	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6590	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6591	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6592	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6593	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6594	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6595	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6596	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6597	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6598	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6599	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6600	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6601	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6602	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6603	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6604	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6605	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6606	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6607	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6608	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6609	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6610	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6611	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6612	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6613	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6614	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6615	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6616	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6617	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6618	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6619	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6620	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6621	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6622	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6623	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6624	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6625	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6626	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6627	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6628	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6629	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6630	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6631	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6632	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6633	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6634	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6635	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6636	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6637	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6638	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6639	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6640	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6641	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6642	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6643	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6644	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6645	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6646	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6647	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6648	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6649	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6650	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6651	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6652	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6653	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6654	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6655	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6656	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6657	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6658	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6659	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6660	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6661	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6662	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6663	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6664	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6665	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6666	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6667	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6668	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6669	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6670	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6671	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6672	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6673	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6674	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6675	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6676	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6677	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6678	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6679	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6680	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6681	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6682	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6683	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6684	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6685	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6686	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6687	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6688	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6689	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6690	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6691	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6692	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6693	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6694	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6695	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6696	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6697	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6698	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6699	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6700	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6701	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6702	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6703	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6704	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6705	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6706	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6707	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6708	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6709	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6710	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6711	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6712	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6713	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6714	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6715	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6716	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6717	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6718	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6719	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6720	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6721	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6722	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6723	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6724	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6725	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6726	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6727	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6728	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6729	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6730	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6731	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6732	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6733	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6734	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6735	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6736	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6737	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6738	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6739	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6740	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6741	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6742	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6743	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6744	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6745	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6746	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6747	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6748	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6749	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6750	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6751	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6752	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6753	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6754	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6755	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6756	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6757	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6758	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6759	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6760	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6761	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6762	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6763	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6764	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6765	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6766	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6767	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6768	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6769	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6770	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6771	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6772	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6773	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6774	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6775	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6776	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6777	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6778	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6779	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6780	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6781	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6782	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6783	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6784	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6785	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6786	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6787	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6788	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6789	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6790	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6791	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6792	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6793	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6794	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6795	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6796	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6797	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6798	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6799	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6800	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6801	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6802	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6803	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6804	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6805	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6806	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6807	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6808	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6809	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6810	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6811	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6812	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6813	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6814	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6815	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6816	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6817	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6818	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6819	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6820	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6821	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6822	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6823	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6824	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6825	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6826	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6827	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6828	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6829	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6830	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6831	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6832	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6833	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6834	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6835	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6836	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6837	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6838	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6839	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6840	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6841	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6842	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6843	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6844	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6845	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6846	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6847	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6848	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6849	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6850	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6851	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6852	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6853	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6854	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6855	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6856	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6857	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6858	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6859	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6860	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6861	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6862	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6863	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6864	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6865	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6866	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6867	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6868	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6869	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6870	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6871	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6872	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6873	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6874	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6875	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6876	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6877	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6878	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6879	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6880	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6881	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6882	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6883	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6884	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6885	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6886	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6887	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6888	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6889	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6890	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6891	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6892	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6893	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6894	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6895	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6896	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6897	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6898	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6899	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6900	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6901	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6902	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6903	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6904	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6905	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6906	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6907	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6908	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6909	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6910	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6911	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6912	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6913	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6914	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6915	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6916	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6917	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6918	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6919	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6920	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6921	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6922	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6923	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6924	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6925	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6926	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6927	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6928	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6929	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6930	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6931	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6932	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6933	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6934	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6935	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6936	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6937	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6938	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6939	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6940	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6941	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6942	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6943	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6944	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6945	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6946	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6947	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6948	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6949	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6950	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6951	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6952	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6953	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6954	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6955	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6956	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6957	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6958	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6959	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6960	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6961	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6962	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6963	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6964	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6965	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6966	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6967	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6968	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6969	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6970	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6971	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6972	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6973	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6974	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6975	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6976	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6977	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6978	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6979	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6980	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6981	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6982	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6983	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6984	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6985	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6986	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6987	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6988	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6989	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6990	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6991	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6992	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6993	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6994	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6995	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6996	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6997	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6998	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_6999	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7000	if AGTIME_ID == .

drop AGTIME_6501-AGTIME_7000

save "C:\NAMED_DIRECTORY\1033_StateQTRData_2014_2023.dta", replace
clear

**VARIABLE BLOCK 7001-7500
use "C:\NAMED_DIRECTORY\1033_StateQTRData_2014_2023.dta"
egen AGTIME_7001	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7001
egen AGTIME_7002	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7002
egen AGTIME_7003	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7003
egen AGTIME_7004	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7004
egen AGTIME_7005	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7005
egen AGTIME_7006	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7006
egen AGTIME_7007	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7007
egen AGTIME_7008	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7008
egen AGTIME_7009	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7009
egen AGTIME_7010	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7010
egen AGTIME_7011	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7011
egen AGTIME_7012	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7012
egen AGTIME_7013	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7013
egen AGTIME_7014	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7014
egen AGTIME_7015	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7015
egen AGTIME_7016	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7016
egen AGTIME_7017	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7017
egen AGTIME_7018	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7018
egen AGTIME_7019	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7019
egen AGTIME_7020	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7020
egen AGTIME_7021	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7021
egen AGTIME_7022	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7022
egen AGTIME_7023	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7023
egen AGTIME_7024	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7024
egen AGTIME_7025	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7025
egen AGTIME_7026	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7026
egen AGTIME_7027	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7027
egen AGTIME_7028	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7028
egen AGTIME_7029	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7029
egen AGTIME_7030	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7030
egen AGTIME_7031	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7031
egen AGTIME_7032	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7032
egen AGTIME_7033	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7033
egen AGTIME_7034	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7034
egen AGTIME_7035	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7035
egen AGTIME_7036	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7036
egen AGTIME_7037	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7037
egen AGTIME_7038	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7038
egen AGTIME_7039	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7039
egen AGTIME_7040	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7040
egen AGTIME_7041	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7041
egen AGTIME_7042	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7042
egen AGTIME_7043	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7043
egen AGTIME_7044	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7044
egen AGTIME_7045	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7045
egen AGTIME_7046	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7046
egen AGTIME_7047	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7047
egen AGTIME_7048	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7048
egen AGTIME_7049	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7049
egen AGTIME_7050	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7050
egen AGTIME_7051	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7051
egen AGTIME_7052	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7052
egen AGTIME_7053	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7053
egen AGTIME_7054	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7054
egen AGTIME_7055	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7055
egen AGTIME_7056	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7056
egen AGTIME_7057	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7057
egen AGTIME_7058	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7058
egen AGTIME_7059	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7059
egen AGTIME_7060	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7060
egen AGTIME_7061	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7061
egen AGTIME_7062	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7062
egen AGTIME_7063	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7063
egen AGTIME_7064	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7064
egen AGTIME_7065	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7065
egen AGTIME_7066	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7066
egen AGTIME_7067	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7067
egen AGTIME_7068	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7068
egen AGTIME_7069	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7069
egen AGTIME_7070	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7070
egen AGTIME_7071	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7071
egen AGTIME_7072	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7072
egen AGTIME_7073	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7073
egen AGTIME_7074	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7074
egen AGTIME_7075	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7075
egen AGTIME_7076	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7076
egen AGTIME_7077	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7077
egen AGTIME_7078	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7078
egen AGTIME_7079	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7079
egen AGTIME_7080	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7080
egen AGTIME_7081	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7081
egen AGTIME_7082	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7082
egen AGTIME_7083	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7083
egen AGTIME_7084	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7084
egen AGTIME_7085	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7085
egen AGTIME_7086	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7086
egen AGTIME_7087	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7087
egen AGTIME_7088	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7088
egen AGTIME_7089	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7089
egen AGTIME_7090	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7090
egen AGTIME_7091	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7091
egen AGTIME_7092	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7092
egen AGTIME_7093	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7093
egen AGTIME_7094	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7094
egen AGTIME_7095	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7095
egen AGTIME_7096	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7096
egen AGTIME_7097	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7097
egen AGTIME_7098	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7098
egen AGTIME_7099	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7099
egen AGTIME_7100	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7100
egen AGTIME_7101	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7101
egen AGTIME_7102	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7102
egen AGTIME_7103	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7103
egen AGTIME_7104	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7104
egen AGTIME_7105	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7105
egen AGTIME_7106	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7106
egen AGTIME_7107	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7107
egen AGTIME_7108	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7108
egen AGTIME_7109	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7109
egen AGTIME_7110	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7110
egen AGTIME_7111	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7111
egen AGTIME_7112	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7112
egen AGTIME_7113	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7113
egen AGTIME_7114	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7114
egen AGTIME_7115	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7115
egen AGTIME_7116	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7116
egen AGTIME_7117	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7117
egen AGTIME_7118	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7118
egen AGTIME_7119	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7119
egen AGTIME_7120	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7120
egen AGTIME_7121	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7121
egen AGTIME_7122	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7122
egen AGTIME_7123	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7123
egen AGTIME_7124	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7124
egen AGTIME_7125	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7125
egen AGTIME_7126	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7126
egen AGTIME_7127	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7127
egen AGTIME_7128	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7128
egen AGTIME_7129	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7129
egen AGTIME_7130	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7130
egen AGTIME_7131	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7131
egen AGTIME_7132	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7132
egen AGTIME_7133	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7133
egen AGTIME_7134	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7134
egen AGTIME_7135	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7135
egen AGTIME_7136	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7136
egen AGTIME_7137	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7137
egen AGTIME_7138	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7138
egen AGTIME_7139	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7139
egen AGTIME_7140	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7140
egen AGTIME_7141	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7141
egen AGTIME_7142	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7142
egen AGTIME_7143	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7143
egen AGTIME_7144	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7144
egen AGTIME_7145	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7145
egen AGTIME_7146	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7146
egen AGTIME_7147	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7147
egen AGTIME_7148	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7148
egen AGTIME_7149	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7149
egen AGTIME_7150	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7150
egen AGTIME_7151	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7151
egen AGTIME_7152	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7152
egen AGTIME_7153	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7153
egen AGTIME_7154	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7154
egen AGTIME_7155	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7155
egen AGTIME_7156	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7156
egen AGTIME_7157	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7157
egen AGTIME_7158	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7158
egen AGTIME_7159	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7159
egen AGTIME_7160	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7160
egen AGTIME_7161	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7161
egen AGTIME_7162	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7162
egen AGTIME_7163	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7163
egen AGTIME_7164	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7164
egen AGTIME_7165	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7165
egen AGTIME_7166	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7166
egen AGTIME_7167	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7167
egen AGTIME_7168	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7168
egen AGTIME_7169	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7169
egen AGTIME_7170	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7170
egen AGTIME_7171	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7171
egen AGTIME_7172	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7172
egen AGTIME_7173	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7173
egen AGTIME_7174	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7174
egen AGTIME_7175	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7175
egen AGTIME_7176	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7176
egen AGTIME_7177	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7177
egen AGTIME_7178	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7178
egen AGTIME_7179	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7179
egen AGTIME_7180	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7180
egen AGTIME_7181	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7181
egen AGTIME_7182	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7182
egen AGTIME_7183	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7183
egen AGTIME_7184	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7184
egen AGTIME_7185	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7185
egen AGTIME_7186	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7186
egen AGTIME_7187	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7187
egen AGTIME_7188	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7188
egen AGTIME_7189	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7189
egen AGTIME_7190	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7190
egen AGTIME_7191	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7191
egen AGTIME_7192	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7192
egen AGTIME_7193	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7193
egen AGTIME_7194	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7194
egen AGTIME_7195	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7195
egen AGTIME_7196	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7196
egen AGTIME_7197	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7197
egen AGTIME_7198	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7198
egen AGTIME_7199	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7199
egen AGTIME_7200	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7200
egen AGTIME_7201	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7201
egen AGTIME_7202	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7202
egen AGTIME_7203	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7203
egen AGTIME_7204	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7204
egen AGTIME_7205	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7205
egen AGTIME_7206	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7206
egen AGTIME_7207	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7207
egen AGTIME_7208	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7208
egen AGTIME_7209	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7209
egen AGTIME_7210	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7210
egen AGTIME_7211	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7211
egen AGTIME_7212	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7212
egen AGTIME_7213	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7213
egen AGTIME_7214	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7214
egen AGTIME_7215	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7215
egen AGTIME_7216	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7216
egen AGTIME_7217	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7217
egen AGTIME_7218	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7218
egen AGTIME_7219	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7219
egen AGTIME_7220	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7220
egen AGTIME_7221	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7221
egen AGTIME_7222	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7222
egen AGTIME_7223	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7223
egen AGTIME_7224	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7224
egen AGTIME_7225	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7225
egen AGTIME_7226	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7226
egen AGTIME_7227	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7227
egen AGTIME_7228	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7228
egen AGTIME_7229	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7229
egen AGTIME_7230	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7230
egen AGTIME_7231	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7231
egen AGTIME_7232	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7232
egen AGTIME_7233	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7233
egen AGTIME_7234	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7234
egen AGTIME_7235	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7235
egen AGTIME_7236	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7236
egen AGTIME_7237	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7237
egen AGTIME_7238	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7238
egen AGTIME_7239	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7239
egen AGTIME_7240	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7240
egen AGTIME_7241	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7241
egen AGTIME_7242	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7242
egen AGTIME_7243	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7243
egen AGTIME_7244	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7244
egen AGTIME_7245	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7245
egen AGTIME_7246	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7246
egen AGTIME_7247	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7247
egen AGTIME_7248	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7248
egen AGTIME_7249	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7249
egen AGTIME_7250	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7250
egen AGTIME_7251	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7251
egen AGTIME_7252	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7252
egen AGTIME_7253	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7253
egen AGTIME_7254	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7254
egen AGTIME_7255	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7255
egen AGTIME_7256	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7256
egen AGTIME_7257	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7257
egen AGTIME_7258	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7258
egen AGTIME_7259	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7259
egen AGTIME_7260	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7260
egen AGTIME_7261	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7261
egen AGTIME_7262	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7262
egen AGTIME_7263	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7263
egen AGTIME_7264	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7264
egen AGTIME_7265	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7265
egen AGTIME_7266	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7266
egen AGTIME_7267	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7267
egen AGTIME_7268	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7268
egen AGTIME_7269	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7269
egen AGTIME_7270	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7270
egen AGTIME_7271	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7271
egen AGTIME_7272	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7272
egen AGTIME_7273	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7273
egen AGTIME_7274	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7274
egen AGTIME_7275	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7275
egen AGTIME_7276	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7276
egen AGTIME_7277	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7277
egen AGTIME_7278	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7278
egen AGTIME_7279	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7279
egen AGTIME_7280	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7280
egen AGTIME_7281	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7281
egen AGTIME_7282	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7282
egen AGTIME_7283	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7283
egen AGTIME_7284	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7284
egen AGTIME_7285	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7285
egen AGTIME_7286	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7286
egen AGTIME_7287	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7287
egen AGTIME_7288	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7288
egen AGTIME_7289	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7289
egen AGTIME_7290	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7290
egen AGTIME_7291	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7291
egen AGTIME_7292	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7292
egen AGTIME_7293	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7293
egen AGTIME_7294	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7294
egen AGTIME_7295	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7295
egen AGTIME_7296	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7296
egen AGTIME_7297	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7297
egen AGTIME_7298	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7298
egen AGTIME_7299	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7299
egen AGTIME_7300	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7300
egen AGTIME_7301	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7301
egen AGTIME_7302	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7302
egen AGTIME_7303	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7303
egen AGTIME_7304	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7304
egen AGTIME_7305	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7305
egen AGTIME_7306	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7306
egen AGTIME_7307	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7307
egen AGTIME_7308	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7308
egen AGTIME_7309	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7309
egen AGTIME_7310	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7310
egen AGTIME_7311	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7311
egen AGTIME_7312	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7312
egen AGTIME_7313	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7313
egen AGTIME_7314	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7314
egen AGTIME_7315	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7315
egen AGTIME_7316	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7316
egen AGTIME_7317	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7317
egen AGTIME_7318	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7318
egen AGTIME_7319	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7319
egen AGTIME_7320	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7320
egen AGTIME_7321	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7321
egen AGTIME_7322	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7322
egen AGTIME_7323	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7323
egen AGTIME_7324	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7324
egen AGTIME_7325	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7325
egen AGTIME_7326	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7326
egen AGTIME_7327	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7327
egen AGTIME_7328	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7328
egen AGTIME_7329	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7329
egen AGTIME_7330	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7330
egen AGTIME_7331	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7331
egen AGTIME_7332	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7332
egen AGTIME_7333	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7333
egen AGTIME_7334	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7334
egen AGTIME_7335	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7335
egen AGTIME_7336	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7336
egen AGTIME_7337	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7337
egen AGTIME_7338	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7338
egen AGTIME_7339	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7339
egen AGTIME_7340	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7340
egen AGTIME_7341	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7341
egen AGTIME_7342	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7342
egen AGTIME_7343	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7343
egen AGTIME_7344	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7344
egen AGTIME_7345	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7345
egen AGTIME_7346	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7346
egen AGTIME_7347	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7347
egen AGTIME_7348	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7348
egen AGTIME_7349	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7349
egen AGTIME_7350	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7350
egen AGTIME_7351	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7351
egen AGTIME_7352	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7352
egen AGTIME_7353	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7353
egen AGTIME_7354	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7354
egen AGTIME_7355	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7355
egen AGTIME_7356	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7356
egen AGTIME_7357	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7357
egen AGTIME_7358	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7358
egen AGTIME_7359	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7359
egen AGTIME_7360	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7360
egen AGTIME_7361	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7361
egen AGTIME_7362	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7362
egen AGTIME_7363	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7363
egen AGTIME_7364	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7364
egen AGTIME_7365	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7365
egen AGTIME_7366	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7366
egen AGTIME_7367	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7367
egen AGTIME_7368	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7368
egen AGTIME_7369	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7369
egen AGTIME_7370	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7370
egen AGTIME_7371	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7371
egen AGTIME_7372	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7372
egen AGTIME_7373	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7373
egen AGTIME_7374	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7374
egen AGTIME_7375	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7375
egen AGTIME_7376	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7376
egen AGTIME_7377	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7377
egen AGTIME_7378	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7378
egen AGTIME_7379	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7379
egen AGTIME_7380	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7380
egen AGTIME_7381	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7381
egen AGTIME_7382	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7382
egen AGTIME_7383	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7383
egen AGTIME_7384	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7384
egen AGTIME_7385	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7385
egen AGTIME_7386	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7386
egen AGTIME_7387	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7387
egen AGTIME_7388	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7388
egen AGTIME_7389	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7389
egen AGTIME_7390	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7390
egen AGTIME_7391	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7391
egen AGTIME_7392	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7392
egen AGTIME_7393	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7393
egen AGTIME_7394	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7394
egen AGTIME_7395	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7395
egen AGTIME_7396	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7396
egen AGTIME_7397	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7397
egen AGTIME_7398	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7398
egen AGTIME_7399	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7399
egen AGTIME_7400	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7400
egen AGTIME_7401	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7401
egen AGTIME_7402	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7402
egen AGTIME_7403	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7403
egen AGTIME_7404	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7404
egen AGTIME_7405	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7405
egen AGTIME_7406	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7406
egen AGTIME_7407	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7407
egen AGTIME_7408	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7408
egen AGTIME_7409	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7409
egen AGTIME_7410	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7410
egen AGTIME_7411	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7411
egen AGTIME_7412	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7412
egen AGTIME_7413	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7413
egen AGTIME_7414	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7414
egen AGTIME_7415	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7415
egen AGTIME_7416	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7416
egen AGTIME_7417	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7417
egen AGTIME_7418	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7418
egen AGTIME_7419	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7419
egen AGTIME_7420	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7420
egen AGTIME_7421	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7421
egen AGTIME_7422	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7422
egen AGTIME_7423	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7423
egen AGTIME_7424	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7424
egen AGTIME_7425	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7425
egen AGTIME_7426	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7426
egen AGTIME_7427	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7427
egen AGTIME_7428	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7428
egen AGTIME_7429	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7429
egen AGTIME_7430	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7430
egen AGTIME_7431	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7431
egen AGTIME_7432	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7432
egen AGTIME_7433	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7433
egen AGTIME_7434	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7434
egen AGTIME_7435	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7435
egen AGTIME_7436	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7436
egen AGTIME_7437	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7437
egen AGTIME_7438	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7438
egen AGTIME_7439	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7439
egen AGTIME_7440	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7440
egen AGTIME_7441	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7441
egen AGTIME_7442	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7442
egen AGTIME_7443	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7443
egen AGTIME_7444	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7444
egen AGTIME_7445	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7445
egen AGTIME_7446	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7446
egen AGTIME_7447	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7447
egen AGTIME_7448	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7448
egen AGTIME_7449	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7449
egen AGTIME_7450	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7450
egen AGTIME_7451	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7451
egen AGTIME_7452	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7452
egen AGTIME_7453	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7453
egen AGTIME_7454	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7454
egen AGTIME_7455	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7455
egen AGTIME_7456	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7456
egen AGTIME_7457	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7457
egen AGTIME_7458	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7458
egen AGTIME_7459	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7459
egen AGTIME_7460	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7460
egen AGTIME_7461	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7461
egen AGTIME_7462	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7462
egen AGTIME_7463	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7463
egen AGTIME_7464	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7464
egen AGTIME_7465	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7465
egen AGTIME_7466	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7466
egen AGTIME_7467	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7467
egen AGTIME_7468	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7468
egen AGTIME_7469	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7469
egen AGTIME_7470	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7470
egen AGTIME_7471	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7471
egen AGTIME_7472	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7472
egen AGTIME_7473	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7473
egen AGTIME_7474	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7474
egen AGTIME_7475	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7475
egen AGTIME_7476	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7476
egen AGTIME_7477	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7477
egen AGTIME_7478	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7478
egen AGTIME_7479	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7479
egen AGTIME_7480	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7480
egen AGTIME_7481	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7481
egen AGTIME_7482	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7482
egen AGTIME_7483	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7483
egen AGTIME_7484	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7484
egen AGTIME_7485	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7485
egen AGTIME_7486	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7486
egen AGTIME_7487	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7487
egen AGTIME_7488	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7488
egen AGTIME_7489	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7489
egen AGTIME_7490	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7490
egen AGTIME_7491	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7491
egen AGTIME_7492	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7492
egen AGTIME_7493	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7493
egen AGTIME_7494	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7494
egen AGTIME_7495	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7495
egen AGTIME_7496	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7496
egen AGTIME_7497	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7497
egen AGTIME_7498	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7498
egen AGTIME_7499	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7499
egen AGTIME_7500	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7500

save "C:\NAMED_DIRECTORY\1033_StateQTRData_2014_2023.dta", replace
clear

**REPLACE AND DROP 7001-7500
use "C:\NAMED_DIRECTORY\1033_StateQTRData_2014_2023.dta"
replace AGTIME_ID =	AGTIME_7001	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7002	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7003	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7004	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7005	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7006	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7007	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7008	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7009	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7010	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7011	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7012	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7013	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7014	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7015	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7016	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7017	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7018	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7019	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7020	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7021	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7022	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7023	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7024	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7025	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7026	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7027	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7028	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7029	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7030	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7031	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7032	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7033	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7034	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7035	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7036	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7037	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7038	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7039	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7040	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7041	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7042	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7043	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7044	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7045	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7046	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7047	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7048	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7049	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7050	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7051	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7052	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7053	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7054	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7055	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7056	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7057	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7058	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7059	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7060	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7061	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7062	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7063	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7064	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7065	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7066	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7067	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7068	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7069	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7070	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7071	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7072	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7073	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7074	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7075	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7076	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7077	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7078	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7079	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7080	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7081	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7082	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7083	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7084	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7085	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7086	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7087	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7088	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7089	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7090	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7091	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7092	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7093	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7094	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7095	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7096	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7097	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7098	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7099	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7100	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7101	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7102	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7103	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7104	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7105	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7106	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7107	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7108	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7109	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7110	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7111	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7112	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7113	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7114	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7115	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7116	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7117	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7118	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7119	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7120	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7121	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7122	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7123	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7124	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7125	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7126	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7127	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7128	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7129	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7130	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7131	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7132	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7133	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7134	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7135	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7136	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7137	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7138	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7139	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7140	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7141	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7142	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7143	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7144	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7145	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7146	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7147	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7148	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7149	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7150	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7151	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7152	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7153	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7154	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7155	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7156	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7157	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7158	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7159	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7160	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7161	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7162	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7163	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7164	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7165	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7166	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7167	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7168	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7169	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7170	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7171	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7172	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7173	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7174	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7175	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7176	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7177	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7178	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7179	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7180	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7181	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7182	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7183	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7184	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7185	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7186	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7187	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7188	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7189	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7190	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7191	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7192	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7193	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7194	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7195	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7196	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7197	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7198	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7199	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7200	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7201	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7202	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7203	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7204	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7205	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7206	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7207	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7208	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7209	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7210	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7211	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7212	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7213	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7214	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7215	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7216	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7217	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7218	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7219	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7220	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7221	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7222	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7223	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7224	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7225	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7226	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7227	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7228	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7229	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7230	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7231	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7232	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7233	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7234	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7235	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7236	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7237	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7238	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7239	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7240	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7241	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7242	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7243	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7244	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7245	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7246	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7247	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7248	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7249	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7250	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7251	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7252	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7253	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7254	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7255	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7256	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7257	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7258	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7259	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7260	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7261	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7262	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7263	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7264	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7265	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7266	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7267	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7268	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7269	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7270	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7271	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7272	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7273	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7274	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7275	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7276	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7277	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7278	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7279	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7280	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7281	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7282	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7283	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7284	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7285	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7286	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7287	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7288	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7289	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7290	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7291	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7292	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7293	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7294	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7295	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7296	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7297	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7298	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7299	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7300	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7301	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7302	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7303	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7304	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7305	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7306	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7307	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7308	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7309	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7310	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7311	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7312	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7313	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7314	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7315	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7316	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7317	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7318	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7319	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7320	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7321	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7322	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7323	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7324	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7325	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7326	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7327	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7328	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7329	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7330	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7331	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7332	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7333	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7334	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7335	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7336	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7337	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7338	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7339	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7340	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7341	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7342	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7343	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7344	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7345	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7346	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7347	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7348	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7349	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7350	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7351	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7352	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7353	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7354	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7355	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7356	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7357	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7358	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7359	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7360	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7361	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7362	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7363	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7364	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7365	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7366	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7367	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7368	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7369	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7370	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7371	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7372	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7373	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7374	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7375	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7376	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7377	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7378	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7379	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7380	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7381	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7382	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7383	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7384	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7385	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7386	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7387	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7388	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7389	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7390	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7391	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7392	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7393	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7394	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7395	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7396	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7397	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7398	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7399	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7400	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7401	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7402	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7403	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7404	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7405	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7406	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7407	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7408	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7409	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7410	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7411	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7412	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7413	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7414	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7415	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7416	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7417	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7418	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7419	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7420	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7421	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7422	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7423	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7424	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7425	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7426	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7427	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7428	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7429	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7430	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7431	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7432	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7433	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7434	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7435	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7436	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7437	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7438	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7439	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7440	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7441	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7442	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7443	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7444	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7445	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7446	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7447	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7448	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7449	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7450	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7451	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7452	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7453	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7454	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7455	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7456	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7457	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7458	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7459	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7460	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7461	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7462	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7463	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7464	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7465	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7466	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7467	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7468	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7469	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7470	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7471	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7472	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7473	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7474	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7475	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7476	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7477	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7478	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7479	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7480	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7481	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7482	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7483	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7484	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7485	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7486	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7487	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7488	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7489	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7490	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7491	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7492	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7493	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7494	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7495	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7496	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7497	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7498	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7499	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7500	if AGTIME_ID == .

drop AGTIME_7001-AGTIME_7500

save "C:\NAMED_DIRECTORY\1033_StateQTRData_2014_2023.dta", replace
clear

**VARIABLE BLOCK 7501-8000
use "C:\NAMED_DIRECTORY\1033_StateQTRData_2014_2023.dta"
egen AGTIME_7501	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7501
egen AGTIME_7502	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7502
egen AGTIME_7503	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7503
egen AGTIME_7504	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7504
egen AGTIME_7505	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7505
egen AGTIME_7506	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7506
egen AGTIME_7507	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7507
egen AGTIME_7508	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7508
egen AGTIME_7509	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7509
egen AGTIME_7510	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7510
egen AGTIME_7511	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7511
egen AGTIME_7512	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7512
egen AGTIME_7513	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7513
egen AGTIME_7514	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7514
egen AGTIME_7515	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7515
egen AGTIME_7516	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7516
egen AGTIME_7517	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7517
egen AGTIME_7518	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7518
egen AGTIME_7519	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7519
egen AGTIME_7520	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7520
egen AGTIME_7521	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7521
egen AGTIME_7522	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7522
egen AGTIME_7523	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7523
egen AGTIME_7524	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7524
egen AGTIME_7525	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7525
egen AGTIME_7526	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7526
egen AGTIME_7527	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7527
egen AGTIME_7528	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7528
egen AGTIME_7529	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7529
egen AGTIME_7530	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7530
egen AGTIME_7531	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7531
egen AGTIME_7532	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7532
egen AGTIME_7533	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7533
egen AGTIME_7534	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7534
egen AGTIME_7535	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7535
egen AGTIME_7536	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7536
egen AGTIME_7537	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7537
egen AGTIME_7538	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7538
egen AGTIME_7539	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7539
egen AGTIME_7540	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7540
egen AGTIME_7541	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7541
egen AGTIME_7542	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7542
egen AGTIME_7543	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7543
egen AGTIME_7544	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7544
egen AGTIME_7545	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7545
egen AGTIME_7546	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7546
egen AGTIME_7547	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7547
egen AGTIME_7548	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7548
egen AGTIME_7549	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7549
egen AGTIME_7550	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7550
egen AGTIME_7551	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7551
egen AGTIME_7552	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7552
egen AGTIME_7553	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7553
egen AGTIME_7554	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7554
egen AGTIME_7555	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7555
egen AGTIME_7556	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7556
egen AGTIME_7557	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7557
egen AGTIME_7558	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7558
egen AGTIME_7559	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7559
egen AGTIME_7560	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7560
egen AGTIME_7561	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7561
egen AGTIME_7562	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7562
egen AGTIME_7563	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7563
egen AGTIME_7564	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7564
egen AGTIME_7565	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7565
egen AGTIME_7566	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7566
egen AGTIME_7567	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7567
egen AGTIME_7568	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7568
egen AGTIME_7569	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7569
egen AGTIME_7570	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7570
egen AGTIME_7571	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7571
egen AGTIME_7572	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7572
egen AGTIME_7573	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7573
egen AGTIME_7574	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7574
egen AGTIME_7575	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7575
egen AGTIME_7576	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7576
egen AGTIME_7577	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7577
egen AGTIME_7578	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7578
egen AGTIME_7579	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7579
egen AGTIME_7580	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7580
egen AGTIME_7581	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7581
egen AGTIME_7582	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7582
egen AGTIME_7583	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7583
egen AGTIME_7584	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7584
egen AGTIME_7585	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7585
egen AGTIME_7586	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7586
egen AGTIME_7587	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7587
egen AGTIME_7588	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7588
egen AGTIME_7589	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7589
egen AGTIME_7590	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7590
egen AGTIME_7591	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7591
egen AGTIME_7592	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7592
egen AGTIME_7593	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7593
egen AGTIME_7594	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7594
egen AGTIME_7595	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7595
egen AGTIME_7596	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7596
egen AGTIME_7597	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7597
egen AGTIME_7598	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7598
egen AGTIME_7599	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7599
egen AGTIME_7600	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7600
egen AGTIME_7601	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7601
egen AGTIME_7602	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7602
egen AGTIME_7603	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7603
egen AGTIME_7604	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7604
egen AGTIME_7605	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7605
egen AGTIME_7606	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7606
egen AGTIME_7607	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7607
egen AGTIME_7608	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7608
egen AGTIME_7609	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7609
egen AGTIME_7610	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7610
egen AGTIME_7611	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7611
egen AGTIME_7612	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7612
egen AGTIME_7613	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7613
egen AGTIME_7614	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7614
egen AGTIME_7615	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7615
egen AGTIME_7616	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7616
egen AGTIME_7617	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7617
egen AGTIME_7618	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7618
egen AGTIME_7619	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7619
egen AGTIME_7620	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7620
egen AGTIME_7621	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7621
egen AGTIME_7622	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7622
egen AGTIME_7623	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7623
egen AGTIME_7624	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7624
egen AGTIME_7625	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7625
egen AGTIME_7626	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7626
egen AGTIME_7627	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7627
egen AGTIME_7628	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7628
egen AGTIME_7629	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7629
egen AGTIME_7630	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7630
egen AGTIME_7631	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7631
egen AGTIME_7632	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7632
egen AGTIME_7633	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7633
egen AGTIME_7634	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7634
egen AGTIME_7635	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7635
egen AGTIME_7636	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7636
egen AGTIME_7637	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7637
egen AGTIME_7638	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7638
egen AGTIME_7639	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7639
egen AGTIME_7640	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7640
egen AGTIME_7641	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7641
egen AGTIME_7642	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7642
egen AGTIME_7643	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7643
egen AGTIME_7644	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7644
egen AGTIME_7645	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7645
egen AGTIME_7646	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7646
egen AGTIME_7647	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7647
egen AGTIME_7648	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7648
egen AGTIME_7649	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7649
egen AGTIME_7650	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7650
egen AGTIME_7651	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7651
egen AGTIME_7652	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7652
egen AGTIME_7653	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7653
egen AGTIME_7654	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7654
egen AGTIME_7655	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7655
egen AGTIME_7656	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7656
egen AGTIME_7657	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7657
egen AGTIME_7658	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7658
egen AGTIME_7659	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7659
egen AGTIME_7660	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7660
egen AGTIME_7661	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7661
egen AGTIME_7662	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7662
egen AGTIME_7663	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7663
egen AGTIME_7664	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7664
egen AGTIME_7665	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7665
egen AGTIME_7666	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7666
egen AGTIME_7667	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7667
egen AGTIME_7668	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7668
egen AGTIME_7669	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7669
egen AGTIME_7670	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7670
egen AGTIME_7671	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7671
egen AGTIME_7672	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7672
egen AGTIME_7673	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7673
egen AGTIME_7674	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7674
egen AGTIME_7675	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7675
egen AGTIME_7676	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7676
egen AGTIME_7677	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7677
egen AGTIME_7678	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7678
egen AGTIME_7679	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7679
egen AGTIME_7680	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7680
egen AGTIME_7681	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7681
egen AGTIME_7682	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7682
egen AGTIME_7683	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7683
egen AGTIME_7684	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7684
egen AGTIME_7685	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7685
egen AGTIME_7686	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7686
egen AGTIME_7687	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7687
egen AGTIME_7688	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7688
egen AGTIME_7689	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7689
egen AGTIME_7690	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7690
egen AGTIME_7691	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7691
egen AGTIME_7692	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7692
egen AGTIME_7693	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7693
egen AGTIME_7694	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7694
egen AGTIME_7695	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7695
egen AGTIME_7696	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7696
egen AGTIME_7697	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7697
egen AGTIME_7698	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7698
egen AGTIME_7699	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7699
egen AGTIME_7700	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7700
egen AGTIME_7701	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7701
egen AGTIME_7702	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7702
egen AGTIME_7703	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7703
egen AGTIME_7704	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7704
egen AGTIME_7705	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7705
egen AGTIME_7706	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7706
egen AGTIME_7707	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7707
egen AGTIME_7708	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7708
egen AGTIME_7709	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7709
egen AGTIME_7710	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7710
egen AGTIME_7711	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7711
egen AGTIME_7712	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7712
egen AGTIME_7713	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7713
egen AGTIME_7714	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7714
egen AGTIME_7715	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7715
egen AGTIME_7716	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7716
egen AGTIME_7717	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7717
egen AGTIME_7718	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7718
egen AGTIME_7719	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7719
egen AGTIME_7720	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7720
egen AGTIME_7721	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7721
egen AGTIME_7722	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7722
egen AGTIME_7723	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7723
egen AGTIME_7724	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7724
egen AGTIME_7725	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7725
egen AGTIME_7726	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7726
egen AGTIME_7727	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7727
egen AGTIME_7728	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7728
egen AGTIME_7729	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7729
egen AGTIME_7730	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7730
egen AGTIME_7731	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7731
egen AGTIME_7732	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7732
egen AGTIME_7733	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7733
egen AGTIME_7734	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7734
egen AGTIME_7735	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7735
egen AGTIME_7736	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7736
egen AGTIME_7737	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7737
egen AGTIME_7738	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7738
egen AGTIME_7739	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7739
egen AGTIME_7740	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7740
egen AGTIME_7741	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7741
egen AGTIME_7742	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7742
egen AGTIME_7743	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7743
egen AGTIME_7744	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7744
egen AGTIME_7745	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7745
egen AGTIME_7746	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7746
egen AGTIME_7747	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7747
egen AGTIME_7748	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7748
egen AGTIME_7749	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7749
egen AGTIME_7750	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7750
egen AGTIME_7751	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7751
egen AGTIME_7752	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7752
egen AGTIME_7753	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7753
egen AGTIME_7754	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7754
egen AGTIME_7755	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7755
egen AGTIME_7756	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7756
egen AGTIME_7757	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7757
egen AGTIME_7758	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7758
egen AGTIME_7759	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7759
egen AGTIME_7760	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7760
egen AGTIME_7761	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7761
egen AGTIME_7762	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7762
egen AGTIME_7763	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7763
egen AGTIME_7764	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7764
egen AGTIME_7765	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7765
egen AGTIME_7766	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7766
egen AGTIME_7767	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7767
egen AGTIME_7768	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7768
egen AGTIME_7769	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7769
egen AGTIME_7770	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7770
egen AGTIME_7771	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7771
egen AGTIME_7772	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7772
egen AGTIME_7773	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7773
egen AGTIME_7774	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7774
egen AGTIME_7775	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7775
egen AGTIME_7776	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7776
egen AGTIME_7777	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7777
egen AGTIME_7778	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7778
egen AGTIME_7779	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7779
egen AGTIME_7780	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7780
egen AGTIME_7781	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7781
egen AGTIME_7782	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7782
egen AGTIME_7783	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7783
egen AGTIME_7784	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7784
egen AGTIME_7785	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7785
egen AGTIME_7786	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7786
egen AGTIME_7787	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7787
egen AGTIME_7788	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7788
egen AGTIME_7789	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7789
egen AGTIME_7790	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7790
egen AGTIME_7791	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7791
egen AGTIME_7792	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7792
egen AGTIME_7793	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7793
egen AGTIME_7794	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7794
egen AGTIME_7795	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7795
egen AGTIME_7796	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7796
egen AGTIME_7797	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7797
egen AGTIME_7798	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7798
egen AGTIME_7799	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7799
egen AGTIME_7800	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7800
egen AGTIME_7801	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7801
egen AGTIME_7802	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7802
egen AGTIME_7803	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7803
egen AGTIME_7804	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7804
egen AGTIME_7805	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7805
egen AGTIME_7806	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7806
egen AGTIME_7807	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7807
egen AGTIME_7808	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7808
egen AGTIME_7809	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7809
egen AGTIME_7810	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7810
egen AGTIME_7811	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7811
egen AGTIME_7812	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7812
egen AGTIME_7813	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7813
egen AGTIME_7814	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7814
egen AGTIME_7815	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7815
egen AGTIME_7816	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7816
egen AGTIME_7817	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7817
egen AGTIME_7818	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7818
egen AGTIME_7819	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7819
egen AGTIME_7820	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7820
egen AGTIME_7821	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7821
egen AGTIME_7822	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7822
egen AGTIME_7823	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7823
egen AGTIME_7824	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7824
egen AGTIME_7825	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7825
egen AGTIME_7826	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7826
egen AGTIME_7827	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7827
egen AGTIME_7828	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7828
egen AGTIME_7829	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7829
egen AGTIME_7830	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7830
egen AGTIME_7831	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7831
egen AGTIME_7832	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7832
egen AGTIME_7833	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7833
egen AGTIME_7834	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7834
egen AGTIME_7835	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7835
egen AGTIME_7836	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7836
egen AGTIME_7837	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7837
egen AGTIME_7838	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7838
egen AGTIME_7839	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7839
egen AGTIME_7840	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7840
egen AGTIME_7841	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7841
egen AGTIME_7842	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7842
egen AGTIME_7843	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7843
egen AGTIME_7844	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7844
egen AGTIME_7845	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7845
egen AGTIME_7846	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7846
egen AGTIME_7847	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7847
egen AGTIME_7848	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7848
egen AGTIME_7849	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7849
egen AGTIME_7850	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7850
egen AGTIME_7851	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7851
egen AGTIME_7852	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7852
egen AGTIME_7853	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7853
egen AGTIME_7854	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7854
egen AGTIME_7855	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7855
egen AGTIME_7856	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7856
egen AGTIME_7857	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7857
egen AGTIME_7858	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7858
egen AGTIME_7859	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7859
egen AGTIME_7860	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7860
egen AGTIME_7861	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7861
egen AGTIME_7862	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7862
egen AGTIME_7863	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7863
egen AGTIME_7864	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7864
egen AGTIME_7865	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7865
egen AGTIME_7866	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7866
egen AGTIME_7867	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7867
egen AGTIME_7868	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7868
egen AGTIME_7869	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7869
egen AGTIME_7870	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7870
egen AGTIME_7871	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7871
egen AGTIME_7872	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7872
egen AGTIME_7873	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7873
egen AGTIME_7874	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7874
egen AGTIME_7875	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7875
egen AGTIME_7876	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7876
egen AGTIME_7877	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7877
egen AGTIME_7878	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7878
egen AGTIME_7879	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7879
egen AGTIME_7880	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7880
egen AGTIME_7881	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7881
egen AGTIME_7882	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7882
egen AGTIME_7883	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7883
egen AGTIME_7884	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7884
egen AGTIME_7885	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7885
egen AGTIME_7886	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7886
egen AGTIME_7887	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7887
egen AGTIME_7888	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7888
egen AGTIME_7889	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7889
egen AGTIME_7890	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7890
egen AGTIME_7891	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7891
egen AGTIME_7892	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7892
egen AGTIME_7893	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7893
egen AGTIME_7894	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7894
egen AGTIME_7895	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7895
egen AGTIME_7896	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7896
egen AGTIME_7897	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7897
egen AGTIME_7898	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7898
egen AGTIME_7899	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7899
egen AGTIME_7900	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7900
egen AGTIME_7901	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7901
egen AGTIME_7902	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7902
egen AGTIME_7903	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7903
egen AGTIME_7904	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7904
egen AGTIME_7905	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7905
egen AGTIME_7906	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7906
egen AGTIME_7907	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7907
egen AGTIME_7908	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7908
egen AGTIME_7909	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7909
egen AGTIME_7910	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7910
egen AGTIME_7911	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7911
egen AGTIME_7912	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7912
egen AGTIME_7913	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7913
egen AGTIME_7914	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7914
egen AGTIME_7915	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7915
egen AGTIME_7916	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7916
egen AGTIME_7917	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7917
egen AGTIME_7918	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7918
egen AGTIME_7919	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7919
egen AGTIME_7920	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7920
egen AGTIME_7921	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7921
egen AGTIME_7922	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7922
egen AGTIME_7923	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7923
egen AGTIME_7924	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7924
egen AGTIME_7925	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7925
egen AGTIME_7926	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7926
egen AGTIME_7927	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7927
egen AGTIME_7928	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7928
egen AGTIME_7929	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7929
egen AGTIME_7930	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7930
egen AGTIME_7931	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7931
egen AGTIME_7932	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7932
egen AGTIME_7933	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7933
egen AGTIME_7934	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7934
egen AGTIME_7935	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7935
egen AGTIME_7936	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7936
egen AGTIME_7937	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7937
egen AGTIME_7938	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7938
egen AGTIME_7939	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7939
egen AGTIME_7940	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7940
egen AGTIME_7941	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7941
egen AGTIME_7942	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7942
egen AGTIME_7943	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7943
egen AGTIME_7944	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7944
egen AGTIME_7945	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7945
egen AGTIME_7946	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7946
egen AGTIME_7947	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7947
egen AGTIME_7948	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7948
egen AGTIME_7949	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7949
egen AGTIME_7950	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7950
egen AGTIME_7951	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7951
egen AGTIME_7952	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7952
egen AGTIME_7953	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7953
egen AGTIME_7954	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7954
egen AGTIME_7955	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7955
egen AGTIME_7956	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7956
egen AGTIME_7957	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7957
egen AGTIME_7958	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7958
egen AGTIME_7959	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7959
egen AGTIME_7960	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7960
egen AGTIME_7961	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7961
egen AGTIME_7962	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7962
egen AGTIME_7963	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7963
egen AGTIME_7964	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7964
egen AGTIME_7965	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7965
egen AGTIME_7966	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7966
egen AGTIME_7967	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7967
egen AGTIME_7968	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7968
egen AGTIME_7969	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7969
egen AGTIME_7970	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7970
egen AGTIME_7971	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7971
egen AGTIME_7972	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7972
egen AGTIME_7973	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7973
egen AGTIME_7974	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7974
egen AGTIME_7975	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7975
egen AGTIME_7976	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7976
egen AGTIME_7977	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7977
egen AGTIME_7978	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7978
egen AGTIME_7979	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7979
egen AGTIME_7980	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7980
egen AGTIME_7981	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7981
egen AGTIME_7982	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7982
egen AGTIME_7983	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7983
egen AGTIME_7984	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7984
egen AGTIME_7985	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7985
egen AGTIME_7986	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7986
egen AGTIME_7987	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7987
egen AGTIME_7988	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7988
egen AGTIME_7989	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7989
egen AGTIME_7990	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7990
egen AGTIME_7991	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7991
egen AGTIME_7992	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7992
egen AGTIME_7993	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7993
egen AGTIME_7994	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7994
egen AGTIME_7995	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7995
egen AGTIME_7996	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7996
egen AGTIME_7997	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7997
egen AGTIME_7998	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7998
egen AGTIME_7999	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 7999
egen AGTIME_8000	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8000

save "C:\NAMED_DIRECTORY\1033_StateQTRData_2014_2023.dta", replace
clear

**REPLACE AND DROP 7501-8000
use "C:\NAMED_DIRECTORY\1033_StateQTRData_2014_2023.dta"
replace AGTIME_ID =	AGTIME_7501	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7502	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7503	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7504	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7505	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7506	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7507	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7508	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7509	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7510	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7511	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7512	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7513	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7514	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7515	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7516	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7517	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7518	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7519	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7520	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7521	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7522	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7523	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7524	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7525	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7526	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7527	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7528	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7529	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7530	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7531	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7532	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7533	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7534	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7535	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7536	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7537	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7538	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7539	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7540	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7541	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7542	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7543	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7544	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7545	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7546	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7547	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7548	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7549	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7550	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7551	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7552	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7553	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7554	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7555	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7556	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7557	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7558	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7559	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7560	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7561	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7562	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7563	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7564	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7565	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7566	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7567	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7568	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7569	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7570	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7571	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7572	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7573	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7574	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7575	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7576	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7577	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7578	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7579	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7580	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7581	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7582	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7583	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7584	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7585	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7586	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7587	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7588	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7589	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7590	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7591	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7592	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7593	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7594	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7595	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7596	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7597	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7598	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7599	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7600	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7601	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7602	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7603	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7604	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7605	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7606	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7607	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7608	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7609	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7610	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7611	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7612	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7613	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7614	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7615	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7616	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7617	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7618	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7619	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7620	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7621	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7622	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7623	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7624	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7625	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7626	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7627	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7628	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7629	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7630	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7631	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7632	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7633	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7634	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7635	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7636	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7637	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7638	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7639	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7640	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7641	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7642	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7643	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7644	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7645	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7646	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7647	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7648	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7649	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7650	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7651	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7652	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7653	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7654	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7655	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7656	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7657	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7658	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7659	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7660	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7661	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7662	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7663	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7664	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7665	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7666	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7667	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7668	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7669	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7670	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7671	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7672	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7673	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7674	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7675	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7676	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7677	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7678	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7679	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7680	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7681	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7682	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7683	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7684	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7685	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7686	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7687	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7688	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7689	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7690	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7691	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7692	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7693	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7694	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7695	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7696	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7697	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7698	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7699	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7700	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7701	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7702	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7703	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7704	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7705	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7706	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7707	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7708	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7709	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7710	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7711	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7712	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7713	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7714	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7715	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7716	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7717	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7718	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7719	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7720	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7721	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7722	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7723	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7724	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7725	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7726	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7727	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7728	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7729	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7730	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7731	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7732	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7733	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7734	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7735	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7736	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7737	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7738	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7739	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7740	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7741	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7742	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7743	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7744	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7745	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7746	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7747	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7748	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7749	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7750	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7751	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7752	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7753	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7754	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7755	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7756	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7757	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7758	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7759	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7760	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7761	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7762	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7763	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7764	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7765	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7766	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7767	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7768	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7769	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7770	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7771	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7772	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7773	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7774	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7775	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7776	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7777	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7778	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7779	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7780	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7781	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7782	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7783	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7784	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7785	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7786	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7787	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7788	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7789	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7790	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7791	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7792	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7793	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7794	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7795	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7796	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7797	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7798	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7799	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7800	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7801	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7802	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7803	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7804	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7805	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7806	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7807	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7808	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7809	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7810	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7811	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7812	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7813	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7814	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7815	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7816	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7817	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7818	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7819	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7820	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7821	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7822	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7823	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7824	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7825	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7826	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7827	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7828	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7829	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7830	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7831	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7832	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7833	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7834	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7835	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7836	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7837	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7838	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7839	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7840	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7841	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7842	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7843	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7844	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7845	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7846	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7847	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7848	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7849	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7850	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7851	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7852	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7853	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7854	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7855	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7856	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7857	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7858	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7859	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7860	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7861	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7862	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7863	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7864	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7865	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7866	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7867	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7868	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7869	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7870	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7871	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7872	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7873	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7874	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7875	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7876	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7877	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7878	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7879	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7880	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7881	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7882	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7883	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7884	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7885	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7886	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7887	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7888	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7889	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7890	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7891	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7892	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7893	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7894	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7895	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7896	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7897	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7898	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7899	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7900	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7901	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7902	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7903	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7904	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7905	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7906	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7907	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7908	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7909	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7910	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7911	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7912	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7913	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7914	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7915	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7916	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7917	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7918	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7919	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7920	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7921	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7922	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7923	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7924	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7925	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7926	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7927	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7928	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7929	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7930	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7931	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7932	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7933	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7934	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7935	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7936	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7937	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7938	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7939	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7940	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7941	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7942	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7943	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7944	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7945	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7946	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7947	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7948	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7949	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7950	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7951	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7952	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7953	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7954	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7955	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7956	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7957	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7958	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7959	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7960	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7961	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7962	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7963	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7964	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7965	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7966	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7967	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7968	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7969	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7970	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7971	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7972	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7973	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7974	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7975	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7976	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7977	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7978	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7979	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7980	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7981	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7982	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7983	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7984	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7985	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7986	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7987	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7988	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7989	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7990	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7991	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7992	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7993	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7994	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7995	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7996	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7997	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7998	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_7999	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8000	if AGTIME_ID == .

drop AGTIME_7501-AGTIME_8000

save "C:\NAMED_DIRECTORY\1033_StateQTRData_2014_2023.dta", replace
clear

**VARIABLE BLOCK 8001-8500
use "C:\NAMED_DIRECTORY\1033_StateQTRData_2014_2023.dta"
egen AGTIME_8001	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8001
egen AGTIME_8002	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8002
egen AGTIME_8003	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8003
egen AGTIME_8004	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8004
egen AGTIME_8005	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8005
egen AGTIME_8006	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8006
egen AGTIME_8007	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8007
egen AGTIME_8008	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8008
egen AGTIME_8009	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8009
egen AGTIME_8010	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8010
egen AGTIME_8011	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8011
egen AGTIME_8012	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8012
egen AGTIME_8013	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8013
egen AGTIME_8014	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8014
egen AGTIME_8015	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8015
egen AGTIME_8016	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8016
egen AGTIME_8017	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8017
egen AGTIME_8018	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8018
egen AGTIME_8019	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8019
egen AGTIME_8020	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8020
egen AGTIME_8021	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8021
egen AGTIME_8022	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8022
egen AGTIME_8023	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8023
egen AGTIME_8024	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8024
egen AGTIME_8025	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8025
egen AGTIME_8026	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8026
egen AGTIME_8027	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8027
egen AGTIME_8028	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8028
egen AGTIME_8029	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8029
egen AGTIME_8030	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8030
egen AGTIME_8031	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8031
egen AGTIME_8032	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8032
egen AGTIME_8033	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8033
egen AGTIME_8034	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8034
egen AGTIME_8035	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8035
egen AGTIME_8036	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8036
egen AGTIME_8037	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8037
egen AGTIME_8038	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8038
egen AGTIME_8039	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8039
egen AGTIME_8040	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8040
egen AGTIME_8041	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8041
egen AGTIME_8042	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8042
egen AGTIME_8043	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8043
egen AGTIME_8044	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8044
egen AGTIME_8045	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8045
egen AGTIME_8046	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8046
egen AGTIME_8047	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8047
egen AGTIME_8048	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8048
egen AGTIME_8049	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8049
egen AGTIME_8050	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8050
egen AGTIME_8051	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8051
egen AGTIME_8052	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8052
egen AGTIME_8053	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8053
egen AGTIME_8054	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8054
egen AGTIME_8055	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8055
egen AGTIME_8056	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8056
egen AGTIME_8057	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8057
egen AGTIME_8058	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8058
egen AGTIME_8059	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8059
egen AGTIME_8060	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8060
egen AGTIME_8061	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8061
egen AGTIME_8062	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8062
egen AGTIME_8063	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8063
egen AGTIME_8064	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8064
egen AGTIME_8065	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8065
egen AGTIME_8066	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8066
egen AGTIME_8067	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8067
egen AGTIME_8068	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8068
egen AGTIME_8069	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8069
egen AGTIME_8070	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8070
egen AGTIME_8071	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8071
egen AGTIME_8072	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8072
egen AGTIME_8073	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8073
egen AGTIME_8074	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8074
egen AGTIME_8075	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8075
egen AGTIME_8076	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8076
egen AGTIME_8077	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8077
egen AGTIME_8078	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8078
egen AGTIME_8079	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8079
egen AGTIME_8080	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8080
egen AGTIME_8081	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8081
egen AGTIME_8082	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8082
egen AGTIME_8083	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8083
egen AGTIME_8084	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8084
egen AGTIME_8085	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8085
egen AGTIME_8086	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8086
egen AGTIME_8087	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8087
egen AGTIME_8088	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8088
egen AGTIME_8089	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8089
egen AGTIME_8090	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8090
egen AGTIME_8091	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8091
egen AGTIME_8092	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8092
egen AGTIME_8093	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8093
egen AGTIME_8094	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8094
egen AGTIME_8095	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8095
egen AGTIME_8096	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8096
egen AGTIME_8097	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8097
egen AGTIME_8098	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8098
egen AGTIME_8099	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8099
egen AGTIME_8100	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8100
egen AGTIME_8101	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8101
egen AGTIME_8102	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8102
egen AGTIME_8103	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8103
egen AGTIME_8104	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8104
egen AGTIME_8105	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8105
egen AGTIME_8106	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8106
egen AGTIME_8107	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8107
egen AGTIME_8108	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8108
egen AGTIME_8109	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8109
egen AGTIME_8110	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8110
egen AGTIME_8111	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8111
egen AGTIME_8112	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8112
egen AGTIME_8113	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8113
egen AGTIME_8114	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8114
egen AGTIME_8115	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8115
egen AGTIME_8116	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8116
egen AGTIME_8117	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8117
egen AGTIME_8118	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8118
egen AGTIME_8119	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8119
egen AGTIME_8120	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8120
egen AGTIME_8121	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8121
egen AGTIME_8122	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8122
egen AGTIME_8123	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8123
egen AGTIME_8124	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8124
egen AGTIME_8125	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8125
egen AGTIME_8126	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8126
egen AGTIME_8127	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8127
egen AGTIME_8128	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8128
egen AGTIME_8129	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8129
egen AGTIME_8130	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8130
egen AGTIME_8131	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8131
egen AGTIME_8132	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8132
egen AGTIME_8133	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8133
egen AGTIME_8134	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8134
egen AGTIME_8135	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8135
egen AGTIME_8136	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8136
egen AGTIME_8137	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8137
egen AGTIME_8138	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8138
egen AGTIME_8139	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8139
egen AGTIME_8140	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8140
egen AGTIME_8141	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8141
egen AGTIME_8142	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8142
egen AGTIME_8143	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8143
egen AGTIME_8144	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8144
egen AGTIME_8145	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8145
egen AGTIME_8146	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8146
egen AGTIME_8147	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8147
egen AGTIME_8148	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8148
egen AGTIME_8149	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8149
egen AGTIME_8150	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8150
egen AGTIME_8151	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8151
egen AGTIME_8152	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8152
egen AGTIME_8153	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8153
egen AGTIME_8154	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8154
egen AGTIME_8155	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8155
egen AGTIME_8156	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8156
egen AGTIME_8157	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8157
egen AGTIME_8158	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8158
egen AGTIME_8159	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8159
egen AGTIME_8160	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8160
egen AGTIME_8161	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8161
egen AGTIME_8162	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8162
egen AGTIME_8163	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8163
egen AGTIME_8164	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8164
egen AGTIME_8165	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8165
egen AGTIME_8166	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8166
egen AGTIME_8167	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8167
egen AGTIME_8168	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8168
egen AGTIME_8169	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8169
egen AGTIME_8170	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8170
egen AGTIME_8171	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8171
egen AGTIME_8172	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8172
egen AGTIME_8173	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8173
egen AGTIME_8174	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8174
egen AGTIME_8175	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8175
egen AGTIME_8176	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8176
egen AGTIME_8177	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8177
egen AGTIME_8178	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8178
egen AGTIME_8179	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8179
egen AGTIME_8180	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8180
egen AGTIME_8181	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8181
egen AGTIME_8182	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8182
egen AGTIME_8183	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8183
egen AGTIME_8184	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8184
egen AGTIME_8185	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8185
egen AGTIME_8186	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8186
egen AGTIME_8187	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8187
egen AGTIME_8188	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8188
egen AGTIME_8189	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8189
egen AGTIME_8190	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8190
egen AGTIME_8191	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8191
egen AGTIME_8192	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8192
egen AGTIME_8193	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8193
egen AGTIME_8194	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8194
egen AGTIME_8195	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8195
egen AGTIME_8196	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8196
egen AGTIME_8197	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8197
egen AGTIME_8198	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8198
egen AGTIME_8199	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8199
egen AGTIME_8200	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8200
egen AGTIME_8201	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8201
egen AGTIME_8202	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8202
egen AGTIME_8203	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8203
egen AGTIME_8204	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8204
egen AGTIME_8205	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8205
egen AGTIME_8206	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8206
egen AGTIME_8207	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8207
egen AGTIME_8208	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8208
egen AGTIME_8209	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8209
egen AGTIME_8210	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8210
egen AGTIME_8211	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8211
egen AGTIME_8212	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8212
egen AGTIME_8213	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8213
egen AGTIME_8214	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8214
egen AGTIME_8215	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8215
egen AGTIME_8216	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8216
egen AGTIME_8217	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8217
egen AGTIME_8218	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8218
egen AGTIME_8219	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8219
egen AGTIME_8220	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8220
egen AGTIME_8221	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8221
egen AGTIME_8222	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8222
egen AGTIME_8223	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8223
egen AGTIME_8224	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8224
egen AGTIME_8225	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8225
egen AGTIME_8226	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8226
egen AGTIME_8227	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8227
egen AGTIME_8228	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8228
egen AGTIME_8229	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8229
egen AGTIME_8230	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8230
egen AGTIME_8231	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8231
egen AGTIME_8232	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8232
egen AGTIME_8233	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8233
egen AGTIME_8234	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8234
egen AGTIME_8235	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8235
egen AGTIME_8236	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8236
egen AGTIME_8237	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8237
egen AGTIME_8238	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8238
egen AGTIME_8239	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8239
egen AGTIME_8240	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8240
egen AGTIME_8241	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8241
egen AGTIME_8242	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8242
egen AGTIME_8243	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8243
egen AGTIME_8244	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8244
egen AGTIME_8245	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8245
egen AGTIME_8246	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8246
egen AGTIME_8247	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8247
egen AGTIME_8248	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8248
egen AGTIME_8249	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8249
egen AGTIME_8250	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8250
egen AGTIME_8251	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8251
egen AGTIME_8252	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8252
egen AGTIME_8253	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8253
egen AGTIME_8254	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8254
egen AGTIME_8255	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8255
egen AGTIME_8256	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8256
egen AGTIME_8257	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8257
egen AGTIME_8258	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8258
egen AGTIME_8259	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8259
egen AGTIME_8260	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8260
egen AGTIME_8261	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8261
egen AGTIME_8262	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8262
egen AGTIME_8263	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8263
egen AGTIME_8264	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8264
egen AGTIME_8265	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8265
egen AGTIME_8266	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8266
egen AGTIME_8267	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8267
egen AGTIME_8268	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8268
egen AGTIME_8269	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8269
egen AGTIME_8270	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8270
egen AGTIME_8271	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8271
egen AGTIME_8272	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8272
egen AGTIME_8273	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8273
egen AGTIME_8274	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8274
egen AGTIME_8275	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8275
egen AGTIME_8276	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8276
egen AGTIME_8277	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8277
egen AGTIME_8278	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8278
egen AGTIME_8279	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8279
egen AGTIME_8280	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8280
egen AGTIME_8281	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8281
egen AGTIME_8282	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8282
egen AGTIME_8283	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8283
egen AGTIME_8284	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8284
egen AGTIME_8285	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8285
egen AGTIME_8286	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8286
egen AGTIME_8287	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8287
egen AGTIME_8288	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8288
egen AGTIME_8289	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8289
egen AGTIME_8290	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8290
egen AGTIME_8291	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8291
egen AGTIME_8292	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8292
egen AGTIME_8293	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8293
egen AGTIME_8294	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8294
egen AGTIME_8295	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8295
egen AGTIME_8296	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8296
egen AGTIME_8297	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8297
egen AGTIME_8298	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8298
egen AGTIME_8299	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8299
egen AGTIME_8300	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8300
egen AGTIME_8301	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8301
egen AGTIME_8302	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8302
egen AGTIME_8303	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8303
egen AGTIME_8304	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8304
egen AGTIME_8305	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8305
egen AGTIME_8306	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8306
egen AGTIME_8307	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8307
egen AGTIME_8308	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8308
egen AGTIME_8309	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8309
egen AGTIME_8310	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8310
egen AGTIME_8311	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8311
egen AGTIME_8312	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8312
egen AGTIME_8313	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8313
egen AGTIME_8314	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8314
egen AGTIME_8315	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8315
egen AGTIME_8316	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8316
egen AGTIME_8317	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8317
egen AGTIME_8318	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8318
egen AGTIME_8319	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8319
egen AGTIME_8320	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8320
egen AGTIME_8321	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8321
egen AGTIME_8322	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8322
egen AGTIME_8323	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8323
egen AGTIME_8324	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8324
egen AGTIME_8325	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8325
egen AGTIME_8326	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8326
egen AGTIME_8327	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8327
egen AGTIME_8328	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8328
egen AGTIME_8329	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8329
egen AGTIME_8330	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8330
egen AGTIME_8331	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8331
egen AGTIME_8332	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8332
egen AGTIME_8333	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8333
egen AGTIME_8334	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8334
egen AGTIME_8335	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8335
egen AGTIME_8336	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8336
egen AGTIME_8337	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8337
egen AGTIME_8338	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8338
egen AGTIME_8339	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8339
egen AGTIME_8340	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8340
egen AGTIME_8341	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8341
egen AGTIME_8342	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8342
egen AGTIME_8343	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8343
egen AGTIME_8344	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8344
egen AGTIME_8345	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8345
egen AGTIME_8346	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8346
egen AGTIME_8347	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8347
egen AGTIME_8348	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8348
egen AGTIME_8349	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8349
egen AGTIME_8350	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8350
egen AGTIME_8351	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8351
egen AGTIME_8352	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8352
egen AGTIME_8353	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8353
egen AGTIME_8354	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8354
egen AGTIME_8355	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8355
egen AGTIME_8356	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8356
egen AGTIME_8357	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8357
egen AGTIME_8358	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8358
egen AGTIME_8359	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8359
egen AGTIME_8360	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8360
egen AGTIME_8361	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8361
egen AGTIME_8362	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8362
egen AGTIME_8363	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8363
egen AGTIME_8364	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8364
egen AGTIME_8365	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8365
egen AGTIME_8366	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8366
egen AGTIME_8367	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8367
egen AGTIME_8368	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8368
egen AGTIME_8369	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8369
egen AGTIME_8370	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8370
egen AGTIME_8371	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8371
egen AGTIME_8372	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8372
egen AGTIME_8373	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8373
egen AGTIME_8374	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8374
egen AGTIME_8375	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8375
egen AGTIME_8376	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8376
egen AGTIME_8377	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8377
egen AGTIME_8378	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8378
egen AGTIME_8379	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8379
egen AGTIME_8380	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8380
egen AGTIME_8381	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8381
egen AGTIME_8382	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8382
egen AGTIME_8383	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8383
egen AGTIME_8384	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8384
egen AGTIME_8385	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8385
egen AGTIME_8386	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8386
egen AGTIME_8387	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8387
egen AGTIME_8388	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8388
egen AGTIME_8389	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8389
egen AGTIME_8390	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8390
egen AGTIME_8391	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8391
egen AGTIME_8392	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8392
egen AGTIME_8393	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8393
egen AGTIME_8394	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8394
egen AGTIME_8395	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8395
egen AGTIME_8396	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8396
egen AGTIME_8397	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8397
egen AGTIME_8398	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8398
egen AGTIME_8399	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8399
egen AGTIME_8400	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8400
egen AGTIME_8401	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8401
egen AGTIME_8402	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8402
egen AGTIME_8403	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8403
egen AGTIME_8404	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8404
egen AGTIME_8405	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8405
egen AGTIME_8406	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8406
egen AGTIME_8407	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8407
egen AGTIME_8408	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8408
egen AGTIME_8409	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8409
egen AGTIME_8410	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8410
egen AGTIME_8411	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8411
egen AGTIME_8412	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8412
egen AGTIME_8413	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8413
egen AGTIME_8414	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8414
egen AGTIME_8415	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8415
egen AGTIME_8416	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8416
egen AGTIME_8417	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8417
egen AGTIME_8418	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8418
egen AGTIME_8419	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8419
egen AGTIME_8420	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8420
egen AGTIME_8421	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8421
egen AGTIME_8422	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8422
egen AGTIME_8423	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8423
egen AGTIME_8424	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8424
egen AGTIME_8425	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8425
egen AGTIME_8426	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8426
egen AGTIME_8427	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8427
egen AGTIME_8428	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8428
egen AGTIME_8429	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8429
egen AGTIME_8430	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8430
egen AGTIME_8431	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8431
egen AGTIME_8432	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8432
egen AGTIME_8433	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8433
egen AGTIME_8434	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8434
egen AGTIME_8435	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8435
egen AGTIME_8436	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8436
egen AGTIME_8437	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8437
egen AGTIME_8438	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8438
egen AGTIME_8439	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8439
egen AGTIME_8440	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8440
egen AGTIME_8441	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8441
egen AGTIME_8442	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8442
egen AGTIME_8443	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8443
egen AGTIME_8444	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8444
egen AGTIME_8445	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8445
egen AGTIME_8446	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8446
egen AGTIME_8447	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8447
egen AGTIME_8448	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8448
egen AGTIME_8449	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8449
egen AGTIME_8450	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8450
egen AGTIME_8451	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8451
egen AGTIME_8452	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8452
egen AGTIME_8453	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8453
egen AGTIME_8454	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8454
egen AGTIME_8455	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8455
egen AGTIME_8456	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8456
egen AGTIME_8457	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8457
egen AGTIME_8458	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8458
egen AGTIME_8459	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8459
egen AGTIME_8460	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8460
egen AGTIME_8461	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8461
egen AGTIME_8462	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8462
egen AGTIME_8463	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8463
egen AGTIME_8464	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8464
egen AGTIME_8465	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8465
egen AGTIME_8466	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8466
egen AGTIME_8467	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8467
egen AGTIME_8468	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8468
egen AGTIME_8469	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8469
egen AGTIME_8470	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8470
egen AGTIME_8471	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8471
egen AGTIME_8472	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8472
egen AGTIME_8473	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8473
egen AGTIME_8474	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8474
egen AGTIME_8475	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8475
egen AGTIME_8476	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8476
egen AGTIME_8477	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8477
egen AGTIME_8478	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8478
egen AGTIME_8479	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8479
egen AGTIME_8480	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8480
egen AGTIME_8481	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8481
egen AGTIME_8482	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8482
egen AGTIME_8483	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8483
egen AGTIME_8484	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8484
egen AGTIME_8485	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8485
egen AGTIME_8486	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8486
egen AGTIME_8487	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8487
egen AGTIME_8488	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8488
egen AGTIME_8489	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8489
egen AGTIME_8490	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8490
egen AGTIME_8491	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8491
egen AGTIME_8492	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8492
egen AGTIME_8493	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8493
egen AGTIME_8494	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8494
egen AGTIME_8495	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8495
egen AGTIME_8496	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8496
egen AGTIME_8497	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8497
egen AGTIME_8498	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8498
egen AGTIME_8499	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8499
egen AGTIME_8500	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8500

save "C:\NAMED_DIRECTORY\1033_StateQTRData_2014_2023.dta", replace
clear

**REPLACE AND DROP 8001-8500
use "C:\NAMED_DIRECTORY\1033_StateQTRData_2014_2023.dta"
replace AGTIME_ID =	AGTIME_8001	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8002	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8003	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8004	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8005	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8006	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8007	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8008	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8009	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8010	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8011	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8012	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8013	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8014	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8015	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8016	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8017	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8018	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8019	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8020	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8021	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8022	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8023	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8024	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8025	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8026	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8027	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8028	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8029	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8030	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8031	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8032	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8033	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8034	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8035	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8036	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8037	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8038	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8039	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8040	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8041	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8042	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8043	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8044	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8045	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8046	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8047	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8048	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8049	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8050	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8051	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8052	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8053	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8054	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8055	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8056	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8057	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8058	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8059	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8060	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8061	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8062	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8063	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8064	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8065	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8066	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8067	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8068	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8069	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8070	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8071	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8072	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8073	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8074	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8075	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8076	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8077	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8078	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8079	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8080	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8081	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8082	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8083	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8084	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8085	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8086	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8087	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8088	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8089	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8090	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8091	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8092	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8093	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8094	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8095	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8096	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8097	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8098	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8099	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8100	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8101	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8102	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8103	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8104	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8105	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8106	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8107	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8108	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8109	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8110	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8111	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8112	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8113	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8114	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8115	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8116	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8117	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8118	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8119	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8120	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8121	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8122	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8123	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8124	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8125	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8126	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8127	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8128	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8129	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8130	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8131	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8132	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8133	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8134	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8135	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8136	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8137	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8138	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8139	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8140	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8141	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8142	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8143	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8144	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8145	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8146	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8147	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8148	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8149	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8150	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8151	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8152	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8153	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8154	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8155	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8156	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8157	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8158	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8159	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8160	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8161	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8162	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8163	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8164	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8165	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8166	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8167	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8168	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8169	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8170	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8171	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8172	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8173	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8174	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8175	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8176	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8177	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8178	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8179	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8180	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8181	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8182	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8183	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8184	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8185	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8186	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8187	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8188	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8189	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8190	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8191	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8192	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8193	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8194	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8195	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8196	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8197	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8198	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8199	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8200	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8201	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8202	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8203	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8204	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8205	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8206	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8207	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8208	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8209	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8210	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8211	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8212	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8213	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8214	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8215	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8216	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8217	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8218	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8219	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8220	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8221	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8222	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8223	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8224	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8225	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8226	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8227	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8228	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8229	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8230	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8231	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8232	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8233	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8234	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8235	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8236	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8237	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8238	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8239	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8240	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8241	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8242	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8243	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8244	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8245	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8246	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8247	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8248	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8249	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8250	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8251	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8252	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8253	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8254	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8255	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8256	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8257	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8258	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8259	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8260	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8261	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8262	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8263	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8264	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8265	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8266	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8267	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8268	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8269	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8270	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8271	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8272	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8273	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8274	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8275	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8276	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8277	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8278	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8279	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8280	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8281	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8282	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8283	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8284	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8285	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8286	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8287	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8288	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8289	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8290	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8291	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8292	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8293	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8294	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8295	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8296	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8297	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8298	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8299	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8300	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8301	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8302	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8303	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8304	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8305	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8306	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8307	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8308	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8309	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8310	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8311	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8312	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8313	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8314	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8315	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8316	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8317	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8318	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8319	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8320	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8321	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8322	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8323	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8324	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8325	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8326	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8327	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8328	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8329	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8330	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8331	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8332	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8333	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8334	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8335	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8336	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8337	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8338	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8339	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8340	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8341	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8342	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8343	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8344	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8345	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8346	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8347	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8348	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8349	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8350	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8351	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8352	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8353	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8354	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8355	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8356	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8357	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8358	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8359	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8360	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8361	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8362	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8363	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8364	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8365	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8366	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8367	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8368	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8369	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8370	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8371	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8372	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8373	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8374	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8375	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8376	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8377	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8378	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8379	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8380	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8381	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8382	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8383	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8384	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8385	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8386	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8387	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8388	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8389	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8390	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8391	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8392	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8393	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8394	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8395	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8396	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8397	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8398	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8399	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8400	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8401	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8402	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8403	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8404	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8405	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8406	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8407	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8408	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8409	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8410	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8411	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8412	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8413	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8414	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8415	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8416	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8417	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8418	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8419	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8420	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8421	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8422	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8423	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8424	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8425	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8426	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8427	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8428	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8429	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8430	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8431	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8432	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8433	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8434	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8435	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8436	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8437	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8438	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8439	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8440	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8441	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8442	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8443	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8444	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8445	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8446	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8447	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8448	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8449	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8450	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8451	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8452	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8453	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8454	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8455	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8456	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8457	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8458	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8459	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8460	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8461	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8462	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8463	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8464	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8465	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8466	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8467	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8468	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8469	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8470	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8471	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8472	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8473	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8474	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8475	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8476	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8477	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8478	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8479	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8480	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8481	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8482	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8483	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8484	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8485	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8486	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8487	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8488	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8489	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8490	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8491	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8492	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8493	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8494	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8495	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8496	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8497	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8498	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8499	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8500	if AGTIME_ID == .

drop AGTIME_8001-AGTIME_8500

save "C:\NAMED_DIRECTORY\1033_StateQTRData_2014_2023.dta", replace
clear

**VARIABLE BLOCK 8501-9000
use "C:\NAMED_DIRECTORY\1033_StateQTRData_2014_2023.dta"
egen AGTIME_8501	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8501
egen AGTIME_8502	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8502
egen AGTIME_8503	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8503
egen AGTIME_8504	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8504
egen AGTIME_8505	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8505
egen AGTIME_8506	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8506
egen AGTIME_8507	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8507
egen AGTIME_8508	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8508
egen AGTIME_8509	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8509
egen AGTIME_8510	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8510
egen AGTIME_8511	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8511
egen AGTIME_8512	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8512
egen AGTIME_8513	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8513
egen AGTIME_8514	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8514
egen AGTIME_8515	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8515
egen AGTIME_8516	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8516
egen AGTIME_8517	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8517
egen AGTIME_8518	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8518
egen AGTIME_8519	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8519
egen AGTIME_8520	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8520
egen AGTIME_8521	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8521
egen AGTIME_8522	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8522
egen AGTIME_8523	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8523
egen AGTIME_8524	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8524
egen AGTIME_8525	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8525
egen AGTIME_8526	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8526
egen AGTIME_8527	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8527
egen AGTIME_8528	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8528
egen AGTIME_8529	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8529
egen AGTIME_8530	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8530
egen AGTIME_8531	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8531
egen AGTIME_8532	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8532
egen AGTIME_8533	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8533
egen AGTIME_8534	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8534
egen AGTIME_8535	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8535
egen AGTIME_8536	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8536
egen AGTIME_8537	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8537
egen AGTIME_8538	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8538
egen AGTIME_8539	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8539
egen AGTIME_8540	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8540
egen AGTIME_8541	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8541
egen AGTIME_8542	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8542
egen AGTIME_8543	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8543
egen AGTIME_8544	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8544
egen AGTIME_8545	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8545
egen AGTIME_8546	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8546
egen AGTIME_8547	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8547
egen AGTIME_8548	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8548
egen AGTIME_8549	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8549
egen AGTIME_8550	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8550
egen AGTIME_8551	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8551
egen AGTIME_8552	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8552
egen AGTIME_8553	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8553
egen AGTIME_8554	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8554
egen AGTIME_8555	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8555
egen AGTIME_8556	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8556
egen AGTIME_8557	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8557
egen AGTIME_8558	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8558
egen AGTIME_8559	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8559
egen AGTIME_8560	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8560
egen AGTIME_8561	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8561
egen AGTIME_8562	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8562
egen AGTIME_8563	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8563
egen AGTIME_8564	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8564
egen AGTIME_8565	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8565
egen AGTIME_8566	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8566
egen AGTIME_8567	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8567
egen AGTIME_8568	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8568
egen AGTIME_8569	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8569
egen AGTIME_8570	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8570
egen AGTIME_8571	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8571
egen AGTIME_8572	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8572
egen AGTIME_8573	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8573
egen AGTIME_8574	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8574
egen AGTIME_8575	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8575
egen AGTIME_8576	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8576
egen AGTIME_8577	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8577
egen AGTIME_8578	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8578
egen AGTIME_8579	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8579
egen AGTIME_8580	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8580
egen AGTIME_8581	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8581
egen AGTIME_8582	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8582
egen AGTIME_8583	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8583
egen AGTIME_8584	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8584
egen AGTIME_8585	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8585
egen AGTIME_8586	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8586
egen AGTIME_8587	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8587
egen AGTIME_8588	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8588
egen AGTIME_8589	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8589
egen AGTIME_8590	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8590
egen AGTIME_8591	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8591
egen AGTIME_8592	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8592
egen AGTIME_8593	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8593
egen AGTIME_8594	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8594
egen AGTIME_8595	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8595
egen AGTIME_8596	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8596
egen AGTIME_8597	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8597
egen AGTIME_8598	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8598
egen AGTIME_8599	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8599
egen AGTIME_8600	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8600
egen AGTIME_8601	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8601
egen AGTIME_8602	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8602
egen AGTIME_8603	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8603
egen AGTIME_8604	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8604
egen AGTIME_8605	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8605
egen AGTIME_8606	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8606
egen AGTIME_8607	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8607
egen AGTIME_8608	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8608
egen AGTIME_8609	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8609
egen AGTIME_8610	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8610
egen AGTIME_8611	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8611
egen AGTIME_8612	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8612
egen AGTIME_8613	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8613
egen AGTIME_8614	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8614
egen AGTIME_8615	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8615
egen AGTIME_8616	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8616
egen AGTIME_8617	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8617
egen AGTIME_8618	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8618
egen AGTIME_8619	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8619
egen AGTIME_8620	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8620
egen AGTIME_8621	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8621
egen AGTIME_8622	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8622
egen AGTIME_8623	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8623
egen AGTIME_8624	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8624
egen AGTIME_8625	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8625
egen AGTIME_8626	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8626
egen AGTIME_8627	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8627
egen AGTIME_8628	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8628
egen AGTIME_8629	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8629
egen AGTIME_8630	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8630
egen AGTIME_8631	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8631
egen AGTIME_8632	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8632
egen AGTIME_8633	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8633
egen AGTIME_8634	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8634
egen AGTIME_8635	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8635
egen AGTIME_8636	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8636
egen AGTIME_8637	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8637
egen AGTIME_8638	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8638
egen AGTIME_8639	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8639
egen AGTIME_8640	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8640
egen AGTIME_8641	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8641
egen AGTIME_8642	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8642
egen AGTIME_8643	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8643
egen AGTIME_8644	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8644
egen AGTIME_8645	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8645
egen AGTIME_8646	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8646
egen AGTIME_8647	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8647
egen AGTIME_8648	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8648
egen AGTIME_8649	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8649
egen AGTIME_8650	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8650
egen AGTIME_8651	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8651
egen AGTIME_8652	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8652
egen AGTIME_8653	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8653
egen AGTIME_8654	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8654
egen AGTIME_8655	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8655
egen AGTIME_8656	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8656
egen AGTIME_8657	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8657
egen AGTIME_8658	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8658
egen AGTIME_8659	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8659
egen AGTIME_8660	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8660
egen AGTIME_8661	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8661
egen AGTIME_8662	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8662
egen AGTIME_8663	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8663
egen AGTIME_8664	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8664
egen AGTIME_8665	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8665
egen AGTIME_8666	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8666
egen AGTIME_8667	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8667
egen AGTIME_8668	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8668
egen AGTIME_8669	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8669
egen AGTIME_8670	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8670
egen AGTIME_8671	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8671
egen AGTIME_8672	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8672
egen AGTIME_8673	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8673
egen AGTIME_8674	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8674
egen AGTIME_8675	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8675
egen AGTIME_8676	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8676
egen AGTIME_8677	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8677
egen AGTIME_8678	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8678
egen AGTIME_8679	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8679
egen AGTIME_8680	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8680
egen AGTIME_8681	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8681
egen AGTIME_8682	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8682
egen AGTIME_8683	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8683
egen AGTIME_8684	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8684
egen AGTIME_8685	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8685
egen AGTIME_8686	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8686
egen AGTIME_8687	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8687
egen AGTIME_8688	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8688
egen AGTIME_8689	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8689
egen AGTIME_8690	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8690
egen AGTIME_8691	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8691
egen AGTIME_8692	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8692
egen AGTIME_8693	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8693
egen AGTIME_8694	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8694
egen AGTIME_8695	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8695
egen AGTIME_8696	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8696
egen AGTIME_8697	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8697
egen AGTIME_8698	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8698
egen AGTIME_8699	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8699
egen AGTIME_8700	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8700
egen AGTIME_8701	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8701
egen AGTIME_8702	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8702
egen AGTIME_8703	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8703
egen AGTIME_8704	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8704
egen AGTIME_8705	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8705
egen AGTIME_8706	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8706
egen AGTIME_8707	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8707
egen AGTIME_8708	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8708
egen AGTIME_8709	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8709
egen AGTIME_8710	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8710
egen AGTIME_8711	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8711
egen AGTIME_8712	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8712
egen AGTIME_8713	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8713
egen AGTIME_8714	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8714
egen AGTIME_8715	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8715
egen AGTIME_8716	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8716
egen AGTIME_8717	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8717
egen AGTIME_8718	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8718
egen AGTIME_8719	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8719
egen AGTIME_8720	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8720
egen AGTIME_8721	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8721
egen AGTIME_8722	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8722
egen AGTIME_8723	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8723
egen AGTIME_8724	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8724
egen AGTIME_8725	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8725
egen AGTIME_8726	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8726
egen AGTIME_8727	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8727
egen AGTIME_8728	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8728
egen AGTIME_8729	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8729
egen AGTIME_8730	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8730
egen AGTIME_8731	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8731
egen AGTIME_8732	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8732
egen AGTIME_8733	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8733
egen AGTIME_8734	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8734
egen AGTIME_8735	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8735
egen AGTIME_8736	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8736
egen AGTIME_8737	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8737
egen AGTIME_8738	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8738
egen AGTIME_8739	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8739
egen AGTIME_8740	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8740
egen AGTIME_8741	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8741
egen AGTIME_8742	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8742
egen AGTIME_8743	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8743
egen AGTIME_8744	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8744
egen AGTIME_8745	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8745
egen AGTIME_8746	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8746
egen AGTIME_8747	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8747
egen AGTIME_8748	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8748
egen AGTIME_8749	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8749
egen AGTIME_8750	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8750
egen AGTIME_8751	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8751
egen AGTIME_8752	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8752
egen AGTIME_8753	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8753
egen AGTIME_8754	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8754
egen AGTIME_8755	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8755
egen AGTIME_8756	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8756
egen AGTIME_8757	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8757
egen AGTIME_8758	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8758
egen AGTIME_8759	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8759
egen AGTIME_8760	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8760
egen AGTIME_8761	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8761
egen AGTIME_8762	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8762
egen AGTIME_8763	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8763
egen AGTIME_8764	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8764
egen AGTIME_8765	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8765
egen AGTIME_8766	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8766
egen AGTIME_8767	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8767
egen AGTIME_8768	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8768
egen AGTIME_8769	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8769
egen AGTIME_8770	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8770
egen AGTIME_8771	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8771
egen AGTIME_8772	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8772
egen AGTIME_8773	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8773
egen AGTIME_8774	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8774
egen AGTIME_8775	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8775
egen AGTIME_8776	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8776
egen AGTIME_8777	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8777
egen AGTIME_8778	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8778
egen AGTIME_8779	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8779
egen AGTIME_8780	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8780
egen AGTIME_8781	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8781
egen AGTIME_8782	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8782
egen AGTIME_8783	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8783
egen AGTIME_8784	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8784
egen AGTIME_8785	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8785
egen AGTIME_8786	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8786
egen AGTIME_8787	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8787
egen AGTIME_8788	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8788
egen AGTIME_8789	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8789
egen AGTIME_8790	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8790
egen AGTIME_8791	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8791
egen AGTIME_8792	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8792
egen AGTIME_8793	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8793
egen AGTIME_8794	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8794
egen AGTIME_8795	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8795
egen AGTIME_8796	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8796
egen AGTIME_8797	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8797
egen AGTIME_8798	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8798
egen AGTIME_8799	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8799
egen AGTIME_8800	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8800
egen AGTIME_8801	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8801
egen AGTIME_8802	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8802
egen AGTIME_8803	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8803
egen AGTIME_8804	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8804
egen AGTIME_8805	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8805
egen AGTIME_8806	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8806
egen AGTIME_8807	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8807
egen AGTIME_8808	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8808
egen AGTIME_8809	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8809
egen AGTIME_8810	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8810
egen AGTIME_8811	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8811
egen AGTIME_8812	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8812
egen AGTIME_8813	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8813
egen AGTIME_8814	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8814
egen AGTIME_8815	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8815
egen AGTIME_8816	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8816
egen AGTIME_8817	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8817
egen AGTIME_8818	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8818
egen AGTIME_8819	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8819
egen AGTIME_8820	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8820
egen AGTIME_8821	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8821
egen AGTIME_8822	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8822
egen AGTIME_8823	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8823
egen AGTIME_8824	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8824
egen AGTIME_8825	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8825
egen AGTIME_8826	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8826
egen AGTIME_8827	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8827
egen AGTIME_8828	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8828
egen AGTIME_8829	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8829
egen AGTIME_8830	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8830
egen AGTIME_8831	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8831
egen AGTIME_8832	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8832
egen AGTIME_8833	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8833
egen AGTIME_8834	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8834
egen AGTIME_8835	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8835
egen AGTIME_8836	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8836
egen AGTIME_8837	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8837
egen AGTIME_8838	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8838
egen AGTIME_8839	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8839
egen AGTIME_8840	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8840
egen AGTIME_8841	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8841
egen AGTIME_8842	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8842
egen AGTIME_8843	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8843
egen AGTIME_8844	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8844
egen AGTIME_8845	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8845
egen AGTIME_8846	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8846
egen AGTIME_8847	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8847
egen AGTIME_8848	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8848
egen AGTIME_8849	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8849
egen AGTIME_8850	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8850
egen AGTIME_8851	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8851
egen AGTIME_8852	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8852
egen AGTIME_8853	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8853
egen AGTIME_8854	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8854
egen AGTIME_8855	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8855
egen AGTIME_8856	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8856
egen AGTIME_8857	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8857
egen AGTIME_8858	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8858
egen AGTIME_8859	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8859
egen AGTIME_8860	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8860
egen AGTIME_8861	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8861
egen AGTIME_8862	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8862
egen AGTIME_8863	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8863
egen AGTIME_8864	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8864
egen AGTIME_8865	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8865
egen AGTIME_8866	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8866
egen AGTIME_8867	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8867
egen AGTIME_8868	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8868
egen AGTIME_8869	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8869
egen AGTIME_8870	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8870
egen AGTIME_8871	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8871
egen AGTIME_8872	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8872
egen AGTIME_8873	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8873
egen AGTIME_8874	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8874
egen AGTIME_8875	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8875
egen AGTIME_8876	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8876
egen AGTIME_8877	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8877
egen AGTIME_8878	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8878
egen AGTIME_8879	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8879
egen AGTIME_8880	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8880
egen AGTIME_8881	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8881
egen AGTIME_8882	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8882
egen AGTIME_8883	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8883
egen AGTIME_8884	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8884
egen AGTIME_8885	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8885
egen AGTIME_8886	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8886
egen AGTIME_8887	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8887
egen AGTIME_8888	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8888
egen AGTIME_8889	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8889
egen AGTIME_8890	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8890
egen AGTIME_8891	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8891
egen AGTIME_8892	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8892
egen AGTIME_8893	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8893
egen AGTIME_8894	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8894
egen AGTIME_8895	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8895
egen AGTIME_8896	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8896
egen AGTIME_8897	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8897
egen AGTIME_8898	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8898
egen AGTIME_8899	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8899
egen AGTIME_8900	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8900
egen AGTIME_8901	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8901
egen AGTIME_8902	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8902
egen AGTIME_8903	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8903
egen AGTIME_8904	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8904
egen AGTIME_8905	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8905
egen AGTIME_8906	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8906
egen AGTIME_8907	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8907
egen AGTIME_8908	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8908
egen AGTIME_8909	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8909
egen AGTIME_8910	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8910
egen AGTIME_8911	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8911
egen AGTIME_8912	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8912
egen AGTIME_8913	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8913
egen AGTIME_8914	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8914
egen AGTIME_8915	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8915
egen AGTIME_8916	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8916
egen AGTIME_8917	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8917
egen AGTIME_8918	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8918
egen AGTIME_8919	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8919
egen AGTIME_8920	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8920
egen AGTIME_8921	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8921
egen AGTIME_8922	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8922
egen AGTIME_8923	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8923
egen AGTIME_8924	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8924
egen AGTIME_8925	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8925
egen AGTIME_8926	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8926
egen AGTIME_8927	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8927
egen AGTIME_8928	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8928
egen AGTIME_8929	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8929
egen AGTIME_8930	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8930
egen AGTIME_8931	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8931
egen AGTIME_8932	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8932
egen AGTIME_8933	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8933
egen AGTIME_8934	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8934
egen AGTIME_8935	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8935
egen AGTIME_8936	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8936
egen AGTIME_8937	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8937
egen AGTIME_8938	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8938
egen AGTIME_8939	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8939
egen AGTIME_8940	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8940
egen AGTIME_8941	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8941
egen AGTIME_8942	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8942
egen AGTIME_8943	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8943
egen AGTIME_8944	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8944
egen AGTIME_8945	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8945
egen AGTIME_8946	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8946
egen AGTIME_8947	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8947
egen AGTIME_8948	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8948
egen AGTIME_8949	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8949
egen AGTIME_8950	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8950
egen AGTIME_8951	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8951
egen AGTIME_8952	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8952
egen AGTIME_8953	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8953
egen AGTIME_8954	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8954
egen AGTIME_8955	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8955
egen AGTIME_8956	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8956
egen AGTIME_8957	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8957
egen AGTIME_8958	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8958
egen AGTIME_8959	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8959
egen AGTIME_8960	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8960
egen AGTIME_8961	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8961
egen AGTIME_8962	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8962
egen AGTIME_8963	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8963
egen AGTIME_8964	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8964
egen AGTIME_8965	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8965
egen AGTIME_8966	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8966
egen AGTIME_8967	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8967
egen AGTIME_8968	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8968
egen AGTIME_8969	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8969
egen AGTIME_8970	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8970
egen AGTIME_8971	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8971
egen AGTIME_8972	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8972
egen AGTIME_8973	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8973
egen AGTIME_8974	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8974
egen AGTIME_8975	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8975
egen AGTIME_8976	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8976
egen AGTIME_8977	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8977
egen AGTIME_8978	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8978
egen AGTIME_8979	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8979
egen AGTIME_8980	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8980
egen AGTIME_8981	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8981
egen AGTIME_8982	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8982
egen AGTIME_8983	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8983
egen AGTIME_8984	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8984
egen AGTIME_8985	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8985
egen AGTIME_8986	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8986
egen AGTIME_8987	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8987
egen AGTIME_8988	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8988
egen AGTIME_8989	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8989
egen AGTIME_8990	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8990
egen AGTIME_8991	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8991
egen AGTIME_8992	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8992
egen AGTIME_8993	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8993
egen AGTIME_8994	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8994
egen AGTIME_8995	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8995
egen AGTIME_8996	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8996
egen AGTIME_8997	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8997
egen AGTIME_8998	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8998
egen AGTIME_8999	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 8999
egen AGTIME_9000	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9000

save "C:\NAMED_DIRECTORY\1033_StateQTRData_2014_2023.dta", replace
clear

**REPLACE AND DROP 8501-9000
use "C:\NAMED_DIRECTORY\1033_StateQTRData_2014_2023.dta"
replace AGTIME_ID =	AGTIME_8501	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8502	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8503	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8504	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8505	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8506	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8507	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8508	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8509	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8510	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8511	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8512	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8513	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8514	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8515	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8516	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8517	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8518	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8519	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8520	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8521	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8522	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8523	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8524	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8525	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8526	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8527	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8528	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8529	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8530	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8531	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8532	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8533	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8534	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8535	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8536	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8537	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8538	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8539	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8540	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8541	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8542	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8543	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8544	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8545	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8546	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8547	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8548	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8549	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8550	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8551	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8552	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8553	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8554	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8555	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8556	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8557	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8558	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8559	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8560	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8561	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8562	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8563	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8564	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8565	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8566	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8567	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8568	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8569	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8570	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8571	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8572	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8573	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8574	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8575	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8576	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8577	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8578	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8579	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8580	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8581	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8582	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8583	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8584	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8585	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8586	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8587	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8588	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8589	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8590	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8591	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8592	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8593	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8594	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8595	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8596	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8597	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8598	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8599	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8600	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8601	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8602	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8603	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8604	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8605	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8606	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8607	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8608	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8609	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8610	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8611	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8612	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8613	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8614	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8615	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8616	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8617	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8618	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8619	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8620	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8621	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8622	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8623	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8624	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8625	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8626	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8627	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8628	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8629	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8630	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8631	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8632	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8633	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8634	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8635	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8636	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8637	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8638	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8639	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8640	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8641	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8642	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8643	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8644	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8645	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8646	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8647	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8648	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8649	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8650	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8651	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8652	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8653	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8654	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8655	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8656	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8657	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8658	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8659	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8660	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8661	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8662	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8663	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8664	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8665	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8666	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8667	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8668	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8669	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8670	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8671	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8672	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8673	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8674	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8675	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8676	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8677	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8678	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8679	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8680	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8681	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8682	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8683	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8684	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8685	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8686	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8687	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8688	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8689	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8690	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8691	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8692	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8693	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8694	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8695	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8696	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8697	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8698	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8699	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8700	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8701	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8702	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8703	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8704	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8705	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8706	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8707	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8708	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8709	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8710	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8711	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8712	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8713	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8714	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8715	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8716	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8717	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8718	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8719	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8720	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8721	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8722	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8723	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8724	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8725	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8726	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8727	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8728	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8729	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8730	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8731	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8732	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8733	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8734	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8735	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8736	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8737	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8738	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8739	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8740	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8741	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8742	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8743	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8744	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8745	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8746	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8747	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8748	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8749	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8750	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8751	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8752	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8753	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8754	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8755	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8756	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8757	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8758	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8759	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8760	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8761	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8762	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8763	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8764	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8765	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8766	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8767	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8768	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8769	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8770	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8771	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8772	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8773	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8774	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8775	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8776	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8777	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8778	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8779	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8780	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8781	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8782	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8783	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8784	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8785	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8786	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8787	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8788	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8789	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8790	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8791	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8792	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8793	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8794	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8795	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8796	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8797	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8798	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8799	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8800	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8801	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8802	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8803	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8804	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8805	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8806	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8807	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8808	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8809	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8810	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8811	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8812	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8813	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8814	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8815	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8816	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8817	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8818	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8819	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8820	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8821	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8822	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8823	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8824	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8825	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8826	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8827	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8828	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8829	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8830	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8831	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8832	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8833	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8834	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8835	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8836	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8837	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8838	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8839	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8840	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8841	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8842	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8843	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8844	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8845	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8846	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8847	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8848	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8849	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8850	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8851	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8852	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8853	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8854	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8855	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8856	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8857	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8858	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8859	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8860	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8861	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8862	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8863	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8864	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8865	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8866	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8867	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8868	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8869	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8870	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8871	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8872	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8873	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8874	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8875	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8876	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8877	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8878	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8879	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8880	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8881	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8882	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8883	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8884	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8885	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8886	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8887	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8888	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8889	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8890	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8891	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8892	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8893	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8894	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8895	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8896	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8897	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8898	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8899	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8900	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8901	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8902	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8903	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8904	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8905	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8906	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8907	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8908	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8909	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8910	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8911	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8912	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8913	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8914	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8915	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8916	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8917	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8918	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8919	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8920	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8921	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8922	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8923	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8924	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8925	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8926	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8927	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8928	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8929	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8930	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8931	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8932	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8933	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8934	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8935	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8936	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8937	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8938	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8939	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8940	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8941	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8942	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8943	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8944	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8945	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8946	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8947	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8948	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8949	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8950	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8951	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8952	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8953	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8954	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8955	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8956	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8957	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8958	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8959	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8960	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8961	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8962	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8963	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8964	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8965	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8966	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8967	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8968	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8969	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8970	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8971	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8972	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8973	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8974	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8975	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8976	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8977	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8978	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8979	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8980	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8981	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8982	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8983	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8984	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8985	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8986	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8987	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8988	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8989	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8990	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8991	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8992	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8993	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8994	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8995	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8996	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8997	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8998	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_8999	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9000	if AGTIME_ID == .

drop AGTIME_8501-AGTIME_9000

save "C:\NAMED_DIRECTORY\1033_StateQTRData_2014_2023.dta", replace
clear

**VARIABLE BLOCK 9001-9385
use "C:\NAMED_DIRECTORY\1033_StateQTRData_2014_2023.dta"
egen AGTIME_9001	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9001
egen AGTIME_9002	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9002
egen AGTIME_9003	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9003
egen AGTIME_9004	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9004
egen AGTIME_9005	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9005
egen AGTIME_9006	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9006
egen AGTIME_9007	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9007
egen AGTIME_9008	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9008
egen AGTIME_9009	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9009
egen AGTIME_9010	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9010
egen AGTIME_9011	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9011
egen AGTIME_9012	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9012
egen AGTIME_9013	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9013
egen AGTIME_9014	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9014
egen AGTIME_9015	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9015
egen AGTIME_9016	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9016
egen AGTIME_9017	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9017
egen AGTIME_9018	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9018
egen AGTIME_9019	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9019
egen AGTIME_9020	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9020
egen AGTIME_9021	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9021
egen AGTIME_9022	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9022
egen AGTIME_9023	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9023
egen AGTIME_9024	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9024
egen AGTIME_9025	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9025
egen AGTIME_9026	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9026
egen AGTIME_9027	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9027
egen AGTIME_9028	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9028
egen AGTIME_9029	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9029
egen AGTIME_9030	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9030
egen AGTIME_9031	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9031
egen AGTIME_9032	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9032
egen AGTIME_9033	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9033
egen AGTIME_9034	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9034
egen AGTIME_9035	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9035
egen AGTIME_9036	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9036
egen AGTIME_9037	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9037
egen AGTIME_9038	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9038
egen AGTIME_9039	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9039
egen AGTIME_9040	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9040
egen AGTIME_9041	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9041
egen AGTIME_9042	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9042
egen AGTIME_9043	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9043
egen AGTIME_9044	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9044
egen AGTIME_9045	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9045
egen AGTIME_9046	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9046
egen AGTIME_9047	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9047
egen AGTIME_9048	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9048
egen AGTIME_9049	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9049
egen AGTIME_9050	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9050
egen AGTIME_9051	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9051
egen AGTIME_9052	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9052
egen AGTIME_9053	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9053
egen AGTIME_9054	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9054
egen AGTIME_9055	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9055
egen AGTIME_9056	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9056
egen AGTIME_9057	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9057
egen AGTIME_9058	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9058
egen AGTIME_9059	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9059
egen AGTIME_9060	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9060
egen AGTIME_9061	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9061
egen AGTIME_9062	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9062
egen AGTIME_9063	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9063
egen AGTIME_9064	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9064
egen AGTIME_9065	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9065
egen AGTIME_9066	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9066
egen AGTIME_9067	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9067
egen AGTIME_9068	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9068
egen AGTIME_9069	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9069
egen AGTIME_9070	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9070
egen AGTIME_9071	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9071
egen AGTIME_9072	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9072
egen AGTIME_9073	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9073
egen AGTIME_9074	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9074
egen AGTIME_9075	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9075
egen AGTIME_9076	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9076
egen AGTIME_9077	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9077
egen AGTIME_9078	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9078
egen AGTIME_9079	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9079
egen AGTIME_9080	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9080
egen AGTIME_9081	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9081
egen AGTIME_9082	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9082
egen AGTIME_9083	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9083
egen AGTIME_9084	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9084
egen AGTIME_9085	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9085
egen AGTIME_9086	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9086
egen AGTIME_9087	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9087
egen AGTIME_9088	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9088
egen AGTIME_9089	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9089
egen AGTIME_9090	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9090
egen AGTIME_9091	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9091
egen AGTIME_9092	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9092
egen AGTIME_9093	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9093
egen AGTIME_9094	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9094
egen AGTIME_9095	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9095
egen AGTIME_9096	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9096
egen AGTIME_9097	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9097
egen AGTIME_9098	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9098
egen AGTIME_9099	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9099
egen AGTIME_9100	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9100
egen AGTIME_9101	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9101
egen AGTIME_9102	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9102
egen AGTIME_9103	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9103
egen AGTIME_9104	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9104
egen AGTIME_9105	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9105
egen AGTIME_9106	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9106
egen AGTIME_9107	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9107
egen AGTIME_9108	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9108
egen AGTIME_9109	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9109
egen AGTIME_9110	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9110
egen AGTIME_9111	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9111
egen AGTIME_9112	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9112
egen AGTIME_9113	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9113
egen AGTIME_9114	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9114
egen AGTIME_9115	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9115
egen AGTIME_9116	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9116
egen AGTIME_9117	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9117
egen AGTIME_9118	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9118
egen AGTIME_9119	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9119
egen AGTIME_9120	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9120
egen AGTIME_9121	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9121
egen AGTIME_9122	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9122
egen AGTIME_9123	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9123
egen AGTIME_9124	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9124
egen AGTIME_9125	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9125
egen AGTIME_9126	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9126
egen AGTIME_9127	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9127
egen AGTIME_9128	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9128
egen AGTIME_9129	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9129
egen AGTIME_9130	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9130
egen AGTIME_9131	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9131
egen AGTIME_9132	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9132
egen AGTIME_9133	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9133
egen AGTIME_9134	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9134
egen AGTIME_9135	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9135
egen AGTIME_9136	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9136
egen AGTIME_9137	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9137
egen AGTIME_9138	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9138
egen AGTIME_9139	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9139
egen AGTIME_9140	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9140
egen AGTIME_9141	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9141
egen AGTIME_9142	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9142
egen AGTIME_9143	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9143
egen AGTIME_9144	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9144
egen AGTIME_9145	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9145
egen AGTIME_9146	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9146
egen AGTIME_9147	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9147
egen AGTIME_9148	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9148
egen AGTIME_9149	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9149
egen AGTIME_9150	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9150
egen AGTIME_9151	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9151
egen AGTIME_9152	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9152
egen AGTIME_9153	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9153
egen AGTIME_9154	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9154
egen AGTIME_9155	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9155
egen AGTIME_9156	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9156
egen AGTIME_9157	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9157
egen AGTIME_9158	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9158
egen AGTIME_9159	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9159
egen AGTIME_9160	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9160
egen AGTIME_9161	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9161
egen AGTIME_9162	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9162
egen AGTIME_9163	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9163
egen AGTIME_9164	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9164
egen AGTIME_9165	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9165
egen AGTIME_9166	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9166
egen AGTIME_9167	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9167
egen AGTIME_9168	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9168
egen AGTIME_9169	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9169
egen AGTIME_9170	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9170
egen AGTIME_9171	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9171
egen AGTIME_9172	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9172
egen AGTIME_9173	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9173
egen AGTIME_9174	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9174
egen AGTIME_9175	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9175
egen AGTIME_9176	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9176
egen AGTIME_9177	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9177
egen AGTIME_9178	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9178
egen AGTIME_9179	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9179
egen AGTIME_9180	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9180
egen AGTIME_9181	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9181
egen AGTIME_9182	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9182
egen AGTIME_9183	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9183
egen AGTIME_9184	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9184
egen AGTIME_9185	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9185
egen AGTIME_9186	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9186
egen AGTIME_9187	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9187
egen AGTIME_9188	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9188
egen AGTIME_9189	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9189
egen AGTIME_9190	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9190
egen AGTIME_9191	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9191
egen AGTIME_9192	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9192
egen AGTIME_9193	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9193
egen AGTIME_9194	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9194
egen AGTIME_9195	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9195
egen AGTIME_9196	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9196
egen AGTIME_9197	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9197
egen AGTIME_9198	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9198
egen AGTIME_9199	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9199
egen AGTIME_9200	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9200
egen AGTIME_9201	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9201
egen AGTIME_9202	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9202
egen AGTIME_9203	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9203
egen AGTIME_9204	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9204
egen AGTIME_9205	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9205
egen AGTIME_9206	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9206
egen AGTIME_9207	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9207
egen AGTIME_9208	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9208
egen AGTIME_9209	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9209
egen AGTIME_9210	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9210
egen AGTIME_9211	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9211
egen AGTIME_9212	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9212
egen AGTIME_9213	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9213
egen AGTIME_9214	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9214
egen AGTIME_9215	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9215
egen AGTIME_9216	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9216
egen AGTIME_9217	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9217
egen AGTIME_9218	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9218
egen AGTIME_9219	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9219
egen AGTIME_9220	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9220
egen AGTIME_9221	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9221
egen AGTIME_9222	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9222
egen AGTIME_9223	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9223
egen AGTIME_9224	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9224
egen AGTIME_9225	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9225
egen AGTIME_9226	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9226
egen AGTIME_9227	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9227
egen AGTIME_9228	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9228
egen AGTIME_9229	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9229
egen AGTIME_9230	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9230
egen AGTIME_9231	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9231
egen AGTIME_9232	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9232
egen AGTIME_9233	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9233
egen AGTIME_9234	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9234
egen AGTIME_9235	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9235
egen AGTIME_9236	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9236
egen AGTIME_9237	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9237
egen AGTIME_9238	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9238
egen AGTIME_9239	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9239
egen AGTIME_9240	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9240
egen AGTIME_9241	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9241
egen AGTIME_9242	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9242
egen AGTIME_9243	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9243
egen AGTIME_9244	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9244
egen AGTIME_9245	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9245
egen AGTIME_9246	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9246
egen AGTIME_9247	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9247
egen AGTIME_9248	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9248
egen AGTIME_9249	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9249
egen AGTIME_9250	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9250
egen AGTIME_9251	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9251
egen AGTIME_9252	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9252
egen AGTIME_9253	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9253
egen AGTIME_9254	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9254
egen AGTIME_9255	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9255
egen AGTIME_9256	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9256
egen AGTIME_9257	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9257
egen AGTIME_9258	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9258
egen AGTIME_9259	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9259
egen AGTIME_9260	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9260
egen AGTIME_9261	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9261
egen AGTIME_9262	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9262
egen AGTIME_9263	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9263
egen AGTIME_9264	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9264
egen AGTIME_9265	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9265
egen AGTIME_9266	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9266
egen AGTIME_9267	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9267
egen AGTIME_9268	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9268
egen AGTIME_9269	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9269
egen AGTIME_9270	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9270
egen AGTIME_9271	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9271
egen AGTIME_9272	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9272
egen AGTIME_9273	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9273
egen AGTIME_9274	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9274
egen AGTIME_9275	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9275
egen AGTIME_9276	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9276
egen AGTIME_9277	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9277
egen AGTIME_9278	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9278
egen AGTIME_9279	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9279
egen AGTIME_9280	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9280
egen AGTIME_9281	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9281
egen AGTIME_9282	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9282
egen AGTIME_9283	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9283
egen AGTIME_9284	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9284
egen AGTIME_9285	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9285
egen AGTIME_9286	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9286
egen AGTIME_9287	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9287
egen AGTIME_9288	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9288
egen AGTIME_9289	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9289
egen AGTIME_9290	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9290
egen AGTIME_9291	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9291
egen AGTIME_9292	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9292
egen AGTIME_9293	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9293
egen AGTIME_9294	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9294
egen AGTIME_9295	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9295
egen AGTIME_9296	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9296
egen AGTIME_9297	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9297
egen AGTIME_9298	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9298
egen AGTIME_9299	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9299
egen AGTIME_9300	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9300
egen AGTIME_9301	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9301
egen AGTIME_9302	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9302
egen AGTIME_9303	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9303
egen AGTIME_9304	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9304
egen AGTIME_9305	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9305
egen AGTIME_9306	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9306
egen AGTIME_9307	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9307
egen AGTIME_9308	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9308
egen AGTIME_9309	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9309
egen AGTIME_9310	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9310
egen AGTIME_9311	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9311
egen AGTIME_9312	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9312
egen AGTIME_9313	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9313
egen AGTIME_9314	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9314
egen AGTIME_9315	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9315
egen AGTIME_9316	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9316
egen AGTIME_9317	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9317
egen AGTIME_9318	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9318
egen AGTIME_9319	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9319
egen AGTIME_9320	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9320
egen AGTIME_9321	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9321
egen AGTIME_9322	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9322
egen AGTIME_9323	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9323
egen AGTIME_9324	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9324
egen AGTIME_9325	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9325
egen AGTIME_9326	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9326
egen AGTIME_9327	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9327
egen AGTIME_9328	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9328
egen AGTIME_9329	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9329
egen AGTIME_9330	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9330
egen AGTIME_9331	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9331
egen AGTIME_9332	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9332
egen AGTIME_9333	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9333
egen AGTIME_9334	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9334
egen AGTIME_9335	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9335
egen AGTIME_9336	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9336
egen AGTIME_9337	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9337
egen AGTIME_9338	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9338
egen AGTIME_9339	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9339
egen AGTIME_9340	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9340
egen AGTIME_9341	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9341
egen AGTIME_9342	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9342
egen AGTIME_9343	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9343
egen AGTIME_9344	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9344
egen AGTIME_9345	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9345
egen AGTIME_9346	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9346
egen AGTIME_9347	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9347
egen AGTIME_9348	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9348
egen AGTIME_9349	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9349
egen AGTIME_9350	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9350
egen AGTIME_9351	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9351
egen AGTIME_9352	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9352
egen AGTIME_9353	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9353
egen AGTIME_9354	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9354
egen AGTIME_9355	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9355
egen AGTIME_9356	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9356
egen AGTIME_9357	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9357
egen AGTIME_9358	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9358
egen AGTIME_9359	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9359
egen AGTIME_9360	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9360
egen AGTIME_9361	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9361
egen AGTIME_9362	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9362
egen AGTIME_9363	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9363
egen AGTIME_9364	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9364
egen AGTIME_9365	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9365
egen AGTIME_9366	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9366
egen AGTIME_9367	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9367
egen AGTIME_9368	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9368
egen AGTIME_9369	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9369
egen AGTIME_9370	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9370
egen AGTIME_9371	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9371
egen AGTIME_9372	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9372
egen AGTIME_9373	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9373
egen AGTIME_9374	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9374
egen AGTIME_9375	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9375
egen AGTIME_9376	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9376
egen AGTIME_9377	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9377
egen AGTIME_9378	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9378
egen AGTIME_9379	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9379
egen AGTIME_9380	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9380
egen AGTIME_9381	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9381
egen AGTIME_9382	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9382
egen AGTIME_9383	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9383
egen AGTIME_9384	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9384
egen AGTIME_9385	=group(AGENCY_ID SHIPDATE) if AGENCY_ID == 9385

save "C:\NAMED_DIRECTORY\1033_StateQTRData_2014_2023.dta", replace
clear

**REPLACE AND DROP 9000-9385
use "C:\NAMED_DIRECTORY\1033_StateQTRData_2014_2023.dta"
replace AGTIME_ID =	AGTIME_9001	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9002	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9003	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9004	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9005	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9006	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9007	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9008	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9009	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9010	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9011	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9012	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9013	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9014	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9015	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9016	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9017	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9018	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9019	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9020	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9021	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9022	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9023	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9024	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9025	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9026	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9027	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9028	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9029	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9030	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9031	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9032	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9033	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9034	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9035	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9036	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9037	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9038	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9039	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9040	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9041	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9042	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9043	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9044	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9045	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9046	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9047	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9048	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9049	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9050	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9051	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9052	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9053	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9054	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9055	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9056	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9057	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9058	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9059	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9060	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9061	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9062	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9063	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9064	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9065	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9066	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9067	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9068	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9069	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9070	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9071	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9072	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9073	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9074	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9075	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9076	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9077	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9078	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9079	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9080	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9081	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9082	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9083	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9084	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9085	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9086	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9087	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9088	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9089	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9090	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9091	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9092	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9093	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9094	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9095	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9096	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9097	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9098	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9099	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9100	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9101	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9102	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9103	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9104	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9105	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9106	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9107	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9108	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9109	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9110	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9111	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9112	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9113	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9114	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9115	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9116	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9117	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9118	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9119	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9120	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9121	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9122	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9123	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9124	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9125	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9126	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9127	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9128	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9129	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9130	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9131	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9132	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9133	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9134	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9135	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9136	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9137	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9138	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9139	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9140	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9141	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9142	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9143	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9144	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9145	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9146	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9147	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9148	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9149	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9150	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9151	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9152	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9153	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9154	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9155	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9156	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9157	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9158	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9159	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9160	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9161	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9162	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9163	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9164	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9165	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9166	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9167	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9168	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9169	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9170	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9171	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9172	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9173	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9174	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9175	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9176	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9177	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9178	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9179	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9180	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9181	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9182	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9183	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9184	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9185	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9186	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9187	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9188	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9189	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9190	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9191	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9192	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9193	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9194	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9195	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9196	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9197	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9198	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9199	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9200	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9201	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9202	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9203	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9204	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9205	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9206	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9207	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9208	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9209	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9210	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9211	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9212	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9213	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9214	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9215	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9216	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9217	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9218	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9219	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9220	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9221	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9222	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9223	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9224	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9225	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9226	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9227	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9228	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9229	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9230	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9231	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9232	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9233	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9234	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9235	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9236	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9237	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9238	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9239	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9240	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9241	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9242	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9243	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9244	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9245	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9246	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9247	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9248	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9249	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9250	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9251	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9252	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9253	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9254	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9255	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9256	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9257	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9258	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9259	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9260	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9261	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9262	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9263	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9264	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9265	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9266	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9267	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9268	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9269	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9270	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9271	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9272	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9273	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9274	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9275	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9276	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9277	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9278	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9279	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9280	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9281	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9282	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9283	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9284	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9285	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9286	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9287	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9288	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9289	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9290	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9291	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9292	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9293	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9294	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9295	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9296	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9297	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9298	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9299	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9300	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9301	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9302	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9303	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9304	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9305	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9306	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9307	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9308	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9309	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9310	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9311	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9312	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9313	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9314	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9315	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9316	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9317	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9318	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9319	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9320	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9321	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9322	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9323	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9324	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9325	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9326	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9327	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9328	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9329	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9330	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9331	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9332	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9333	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9334	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9335	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9336	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9337	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9338	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9339	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9340	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9341	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9342	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9343	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9344	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9345	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9346	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9347	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9348	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9349	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9350	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9351	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9352	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9353	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9354	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9355	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9356	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9357	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9358	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9359	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9360	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9361	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9362	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9363	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9364	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9365	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9366	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9367	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9368	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9369	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9370	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9371	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9372	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9373	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9374	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9375	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9376	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9377	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9378	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9379	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9380	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9381	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9382	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9383	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9384	if AGTIME_ID == .
replace AGTIME_ID =	AGTIME_9385	if AGTIME_ID == .
drop AGTIME_9001-AGTIME_9385

**SAVE ALL AGENCY/SHIPMENT/QUARTER FILE
save "C:\NAMED_DIRECTORY\1033_AgencyQTRData_2014_2023.dta", replace
clear

**FINALIZE VARIABLES FOR LONGITUDINAL DATABASE
use "C:\NAMED_DIRECTORY\1033_AgencyQTRData_2014_2023.dta"
drop ITEM_ID
drop if SHIPDATE == .
label var AGTIME_ID "Agency Individual Shipment Panel"

sort AGENCY_ID AGTIME_ID QTR
by AGENCY_ID AGTIME_ID: gen AGSHIP_ID = _n
order AGSHIP_ID, after(AGTIME_ID)
label var AGSHIP_ID "Agency Individual Shipment Count"

sort AGENCY_ID AGTIME_ID ITEMNAME QTR
by AGENCY_ID AGTIME_ID ITEMNAME: gen ITEM_ID = _n
order ITEM_ID, after(AGTIME_ID)
label var ITEM_ID "Agency Individual Shipment Count by Type"

by AGENCY_ID: gen AGTOTAL_ID = _n
order AGTOTAL_ID, after(AGSHIP_ID)
label var AGTOTAL_ID "Agency Total Shipment Count"

save "C:\NAMED_DIRECTORY\1033_AgencyQTRData_2014_2023.dta", replace
clear

**MERGE BACK IN NSN
**NATIONAL STOCK NUMBER ADDS AN IDENTIFICATION VARIABLE FOR FUTURE USE
use "C:\NAMED_DIRECTORY\1033_AgencyQTRData_2014_2023.dta"
**MERGE 2014-2020 Q1 NSN
merge m:m AGENCY_ID ITEMNAME DEMILCODE DEMILIC using "C:\NAMED_DIRECTORY\1033_NSN2_2014_2020.dta"
sort AGENCY_ID AGTIME_ID ITEM_ID
drop _merge
order NSN, before(ITEMNAME)
label var NSN "1033 Item Unique Identifier"

**MERGE 2020 Q2 NSN
merge m:m AGENCY_ID ITEMNAME DEMILCODE DEMILIC using "C:\NAMED_DIRECTORY\1033_NSN_2020_Q2.dta" 
sort AGENCY_ID AGTIME_ID ITEM_ID
drop _merge
order NSN, before(ITEMNAME)
label var NSN "1033 Item Unique Identifier"

**MERGE 2020 Q4 NSN
merge m:m AGENCY_ID ITEMNAME DEMILCODE DEMILIC using "C:\NAMED_DIRECTORY\1033_NSN_2020_Q4.dta" 
sort AGENCY_ID AGTIME_ID ITEM_ID
drop _merge
order NSN, before(ITEMNAME)
label var NSN "1033 Item Unique Identifier"

**MERGE 2021 Q2 NSN
merge m:m AGENCY_ID ITEMNAME DEMILCODE DEMILIC using "C:\NAMED_DIRECTORY\1033_NSN_2021_Q2.dta" 
sort AGENCY_ID AGTIME_ID ITEM_ID
drop _merge
order NSN, before(ITEMNAME)
label var NSN "1033 Item Unique Identifier"

**MERGE 2021 Q3 NSN
merge m:m AGENCY_ID ITEMNAME DEMILCODE DEMILIC using "C:\NAMED_DIRECTORY\1033_NSN_2021_Q3.dta" 
sort AGENCY_ID AGTIME_ID ITEM_ID
drop _merge
order NSN, before(ITEMNAME)
label var NSN "1033 Item Unique Identifier"

**MERGE 2022 Q1 NSN
merge m:m AGENCY_ID ITEMNAME DEMILCODE DEMILIC using "C:\NAMED_DIRECTORY\1033_NSN_2022_Q1.dta" 
sort AGENCY_ID AGTIME_ID ITEM_ID
drop _merge
order NSN, before(ITEMNAME)
label var NSN "1033 Item Unique Identifier"

**MERGE 2022 Q2 NSN
merge m:m AGENCY_ID ITEMNAME DEMILCODE DEMILIC using "C:\NAMED_DIRECTORY\1033_NSN_2022_Q2.dta" 
sort AGENCY_ID AGTIME_ID ITEM_ID
drop _merge
order NSN, before(ITEMNAME)
label var NSN "1033 Item Unique Identifier"

**MERGE 2022 Q4 NSN
merge m:m AGENCY_ID ITEMNAME DEMILCODE DEMILIC using "C:\NAMED_DIRECTORY\1033_NSN_2022_Q4.dta" 
sort AGENCY_ID AGTIME_ID ITEM_ID
drop _merge
order NSN, before(ITEMNAME)
label var NSN "1033 Item Unique Identifier"

**MERGE 2023 Q1 NSN
merge m:m AGENCY_ID ITEMNAME DEMILCODE DEMILIC using "C:\NAMED_DIRECTORY\1033_NSN_2023_Q1.dta" 
sort AGENCY_ID AGTIME_ID ITEM_ID
drop _merge
order NSN, before(ITEMNAME)
label var NSN "1033 Item Unique Identifier"

**MERGE 2023 Q2 NSN
merge m:m AGENCY_ID ITEMNAME DEMILCODE DEMILIC using "C:\NAMED_DIRECTORY\1033_NSN_2023_Q2.dta" 
sort AGENCY_ID AGTIME_ID ITEM_ID
drop _merge
order NSN, before(ITEMNAME)
label var NSN "1033 Item Unique Identifier"

save "C:\NAMED_DIRECTORY\1033_AgencyQTRData_2023_2.dta", replace
clear

**EXAMPLE FOR FUTURE QUARTERLY RELEASE
**MERGE 2023 Q3 NSN
*merge m:m AGENCY_ID ITEMNAME DEMILCODE DEMILIC using "C:\NAMED_DIRECTORY\1033_NSN_2023_Q3.dta" 
*sort AGENCY_ID AGTIME_ID ITEM_ID
*drop _merge
*order NSN, before(ITEMNAME)
*label var NSN "1033 Item Unique Identifier"

**FINAL DATABASE
**THIS CAN ALSO BE IMMEDIATELY ACCESSED IN THE SEPARATE CURRENT DATABASE FOLDER
use "C:\NAMED_DIRECTORY\1033_AgencyQTRData_2023_2.dta"
drop TIME_ID
save "C:\NAMED_DIRECTORY\1033_AgencyQTRData_2014-4_2023-2.dta", replace
export delimited using "C:\NAMED_DIRECTORY\1033_AgencyQTRData_2014-4_2023-2.csv", replace







